include more babel and statics to acl
This commit is contained in:
parent
f9a4228a03
commit
9b57cc5587
|
@ -32,7 +32,7 @@ In der Datei update-dns.sh die Konfigurationsparameter setzen.
|
||||||
|
|
||||||
|
|
||||||
#### Cron anlegen
|
#### Cron anlegen
|
||||||
Schließlich muss noch ein Cron angelegt werden, der regelmäßig das Skript aufruft, welches die Zonendatei aktualisiert und die Reverse-Skripte aufruft:
|
Schließlich muss noch ein Cron angelegt werden, der regelmäßig das Skript aufruft:
|
||||||
```
|
```
|
||||||
1-59/5 * * * * /usr/lib/ffdns/update-dns.sh
|
1-59/5 * * * * /usr/lib/ffdns/update-dns.sh
|
||||||
```
|
```
|
||||||
|
|
|
@ -117,7 +117,7 @@ for Hood in $Hoods; do
|
||||||
./update-extzone.sh "$HoodZoneFile" "$ExternFile" "$HoodDomain" "$ExternalView"
|
./update-extzone.sh "$HoodZoneFile" "$ExternFile" "$HoodDomain" "$ExternalView"
|
||||||
done
|
done
|
||||||
|
|
||||||
./update-public-acl.sh "$BindIcvpnAclTmp"
|
./update-public-acl.sh "$BindIcvpnAclTmp" "$RemoteLocation"
|
||||||
|
|
||||||
ReConfigBind=1
|
ReConfigBind=1
|
||||||
UpdateBindConfig() {
|
UpdateBindConfig() {
|
||||||
|
|
|
@ -3,14 +3,24 @@
|
||||||
. ./dns-functions.sh
|
. ./dns-functions.sh
|
||||||
|
|
||||||
IncludeFile="$1"
|
IncludeFile="$1"
|
||||||
|
RemoteLocation="$2"
|
||||||
|
|
||||||
rm -f "$IncludeFile"
|
rm -f "$IncludeFile"
|
||||||
|
|
||||||
|
InstalledRoutes="$(echo "dump" | nc ::1 33123 | \
|
||||||
|
sed -e '/\(add route .* installed yes\|add xroute\)/!d')"
|
||||||
|
PublicSubs="$(echo "$InstalledRoutes" | \
|
||||||
|
sed -e '/\( from ::\/0\| from 0\.0\.0\.0\/0\)/d;s/.* from \(\S\+\).*/\t\1;/g')"
|
||||||
|
PrivatePrefix="\(192\.168\.\|172\.\(1[6-9]\|2[0-9]\|3[01]\)\.\|10\.\|[fF][cCdD][0-9a-fA-F]\{2\}:\)"
|
||||||
|
PublicSingles="$(echo "$InstalledRoutes" | \
|
||||||
|
sed -e '/\( from ::\/0\| from 0\.0\.0\.0\/0\)/!d;s/.* prefix \(\S\+\) .*/\1/g;'" \
|
||||||
|
"'/^'"$PrivatePrefix"'/d;/^\(0\.\|::\|64:ff9b::\)/d;s/^/\t/g;s/$/;/g')"
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "acl icvpnrange {"
|
echo "acl icvpnrange {"
|
||||||
echo " icvpnlocal;"
|
echo " icvpnlocal;"
|
||||||
echo "dump" | nc ::1 33123 | \
|
echo "$PublicSubs"
|
||||||
sed -e '/add route/!d;/installed yes/!d;/\(from ::\/0\|from 0\.0\.0\.0\/0\)/d;' | \
|
echo "$(curl -s -S -f "$RemoteLocation""external.dnsserverips" | sed -e 's/^/\t/g;s/$/;/g')"
|
||||||
sed -ne 's/^.*from \(\S\+\).*/\t\1;/p'
|
echo "$PublicSingles"
|
||||||
echo "};"
|
echo "};"
|
||||||
} > "$IncludeFile"
|
} > "$IncludeFile"
|
|
@ -54,7 +54,7 @@ if [ $((NewReverseSerial)) -gt $((OldSerial)) ]; then
|
||||||
Static="/""$ReverseZoneFile"
|
Static="/""$ReverseZoneFile"
|
||||||
Static="${Static%/*}""/static.""${Static##*/}"
|
Static="${Static%/*}""/static.""${Static##*/}"
|
||||||
Static="${Static#*/}"
|
Static="${Static#*/}"
|
||||||
[ -f "$Static" ] && cat "$Static"
|
[ -f "$Static" ] && echo "$(cat "$Static")"
|
||||||
echo
|
echo
|
||||||
} > "$TempDir/$ReverseZone"
|
} > "$TempDir/$ReverseZone"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue