Adapt hostnames to new vpn server setup, use NSD instead of BIND
This commit is contained in:
parent
17e170483a
commit
c4770ca5e4
|
@ -40,7 +40,8 @@ downloads CNAME www
|
||||||
wiki CNAME www
|
wiki CNAME www
|
||||||
|
|
||||||
; mesh stuff
|
; mesh stuff
|
||||||
nodes NS vpn01.bremen.freifunk.net.
|
nodes NS vpn02
|
||||||
|
nodes NS vpn03
|
||||||
|
|
||||||
node A 10.196.0.127
|
node A 10.196.0.127
|
||||||
AAAA fd2f:5119:f2c::127
|
AAAA fd2f:5119:f2c::127
|
||||||
|
|
|
@ -28,7 +28,7 @@ if not domain.endswith("."):
|
||||||
domain = domain + "."
|
domain = domain + "."
|
||||||
|
|
||||||
print("""$TTL 1h
|
print("""$TTL 1h
|
||||||
@ IN SOA vpn01.bremen.freifunk.net. noc.bremen.freifunk.net. (
|
@ IN SOA vpn03.bremen.freifunk.net. noc.bremen.freifunk.net. (
|
||||||
%s ; serial
|
%s ; serial
|
||||||
1h ; refresh
|
1h ; refresh
|
||||||
30m ; retry
|
30m ; retry
|
||||||
|
@ -36,7 +36,8 @@ print("""$TTL 1h
|
||||||
1h ; caching
|
1h ; caching
|
||||||
)
|
)
|
||||||
|
|
||||||
NS vpn01.bremen.freifunk.net.
|
NS vpn02.bremen.freifunk.net.
|
||||||
|
NS vpn03.bremen.freifunk.net.
|
||||||
""" % datetime.now().strftime("%Y%m%d%H%M"))
|
""" % datetime.now().strftime("%Y%m%d%H%M"))
|
||||||
|
|
||||||
for node in data.values():
|
for node in data.values():
|
||||||
|
|
|
@ -55,8 +55,8 @@ if [ -z "$TMP_FILE" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# names of zones
|
# names of zones
|
||||||
ZONEFILE=/var/cache/bind/ffhb.nodes.zone
|
ZONEFILE=/var/lib/nsd/net.freifunk.bremen.nodes.zone
|
||||||
RZONEFILE=/var/cache/bind/arpa.ip6.f.d.2.f.5.1.1.9.0.f.2.c.zone
|
RZONEFILE=/var/lib/nsd/arpa.ip6.f.d.2.f.5.1.1.9.0.f.2.c.zone
|
||||||
|
|
||||||
function on_exit() {
|
function on_exit() {
|
||||||
# remove tmp files
|
# remove tmp files
|
||||||
|
@ -112,7 +112,7 @@ if rzonegen.py 0.0.0.0.c.2.f.0.9.1.1.5.f.2.d.f.ip6.arpa <"$TMP_FILE" >"${RZONEFI
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# reload nameserver
|
# reload nameserver
|
||||||
rndc reload >/dev/null
|
nsd-control reload > /dev/null
|
||||||
|
|
||||||
# copy alfred file
|
# copy alfred file
|
||||||
cp "$TMP_FILE" "$ALFRED_DATA_FILE"
|
cp "$TMP_FILE" "$ALFRED_DATA_FILE"
|
||||||
|
|
|
@ -20,7 +20,7 @@ def str_to_domainlabel(s):
|
||||||
data = json.load(sys.stdin)
|
data = json.load(sys.stdin)
|
||||||
|
|
||||||
print("""$TTL 1h
|
print("""$TTL 1h
|
||||||
@ IN SOA vpn01.bremen.freifunk.net. noc.bremen.freifunk.net. (
|
@ IN SOA vpn03.bremen.freifunk.net. noc.bremen.freifunk.net. (
|
||||||
%s ; serial
|
%s ; serial
|
||||||
1h ; refresh
|
1h ; refresh
|
||||||
30m ; retry
|
30m ; retry
|
||||||
|
@ -28,7 +28,8 @@ print("""$TTL 1h
|
||||||
1h ; caching
|
1h ; caching
|
||||||
)
|
)
|
||||||
|
|
||||||
NS vpn01.bremen.freifunk.net.
|
NS vpn02.bremen.freifunk.net.
|
||||||
|
NS vpn03.bremen.freifunk.net.
|
||||||
|
|
||||||
""" % datetime.now().strftime("%Y%m%d%H%M"))
|
""" % datetime.now().strftime("%Y%m%d%H%M"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue