Make NSD listen on public and private IP addresses

This commit is contained in:
Wolf-Bastian Poettner 2016-12-05 10:30:50 +01:00
parent 4e18f66db6
commit bba4e089af
1 changed files with 5 additions and 1 deletions

View File

@ -45,7 +45,11 @@ EOF
# DNS queries that require a recursive nameserver, and the system # DNS queries that require a recursive nameserver, and the system
# might have other network interfaces for e.g. tunnelling, we have # might have other network interfaces for e.g. tunnelling, we have
# to be specific about the network interfaces that nsd binds to. # 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; echo " ip-address: $ip" >> /etc/nsd/nsd.conf;
done done