diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2016-01-24 17:25:14 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2016-01-24 17:25:14 +0100 |
commit | 2509dfb2b4455536649fc9e3090f602fc1d3d21e (patch) | |
tree | 6c47da261b2ba466f6b4a4f01b49c0f5d5c32d93 /template | |
parent | 0f0878e6820f8fd04fa4f06290e6ed2f061ed6e9 (diff) | |
download | OpenBSD-firewall-2509dfb2b4455536649fc9e3090f602fc1d3d21e.tar.gz OpenBSD-firewall-2509dfb2b4455536649fc9e3090f602fc1d3d21e.tar.bz2 |
added two nsd's for handling the split horizon
Diffstat (limited to 'template')
-rwxr-xr-x | template/usr/sbin/restart_dns | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/template/usr/sbin/restart_dns b/template/usr/sbin/restart_dns index e36d8d7..8a23111 100755 --- a/template/usr/sbin/restart_dns +++ b/template/usr/sbin/restart_dns @@ -8,14 +8,17 @@ echo "unbound: stopping ..." pkill unbound sleep 3 -echo "nsd: starting authorative name server ..." -rm -rf /tmp/var/nsd -cp -R /etc/nsd /tmp/var/nsd -chown -R root:_nsd /tmp/var/nsd/{db,etc,run} -chmod 0770 /tmp/var/nsd/{db,run,run/xfr} +echo "nsd: redeploy from persistent /etc/nsd to /var/nsd ..." +for view in internal external; do + rm -rf /tmp/var/nsd-$view + cp -R /etc/nsd-$view /tmp/var/nsd-$view + chown -R root:_nsd /tmp/var/nsd-$view/{db,etc,run} + chmod 0770 /tmp/var/nsd-$view/{db,run,run/xfr} +done echo "nsd: restarting ..." -/usr/sbin/nsd +/usr/sbin/nsd -c /var/nsd-internal/etc/nsd.conf +/usr/sbin/nsd -c /var/nsd-external/etc/nsd.conf echo "unbound: redeploy from persistent /etc/unbound to /var/unboud ..." rm -rf /tmp/var/unbound |