From bba4e089af188e34739ae3bff58fefeeadd707a6 Mon Sep 17 00:00:00 2001 From: Wolf-Bastian Poettner Date: Mon, 5 Dec 2016 10:30:50 +0100 Subject: [PATCH] Make NSD listen on public and private IP addresses --- setup/dns.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/dns.sh b/setup/dns.sh index 44f6431c..9b2c6e8d 100755 --- a/setup/dns.sh +++ b/setup/dns.sh @@ -45,7 +45,11 @@ EOF # DNS queries that require a recursive nameserver, and the system # might have other network interfaces for e.g. tunnelling, we have # to be specific about the network interfaces that nsd binds to. -for ip in $PRIVATE_IP $PRIVATE_IPV6; do +# +# NSD does not support providing the same ip multiple times so we +# have to sort through the list and make sure, that each ip is only +# listed once in the config +for ip in `echo $PUBLIC_IP $PRIVATE_IP $PUBLIC_IPV6 $PRIVATE_IPV6 | tr ' ' '\n' | sort -u`; do echo " ip-address: $ip" >> /etc/nsd/nsd.conf; done