This is on a Debian 12.10 lxc machine. I'm trying to get bind9/named to listen on a second localhost IP:
/etc/bind/named.conf.options: options { listen-on port 53 { 127.0.0.1; 192.168.18.2; }; listen-on port 5353 { 127.0.0.2; }; [...] } I've also tried
listen-on port 53 { 127.0.0.1; 127.0.0.2; 192.168.18.2; }; but it's not working (yes, I restarted named after making this configuration change):
$ sudo netstat -tunapl4 Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2126/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2126/named tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 339/master tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2126/named tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2126/named tcp 0 0 192.168.18.2:53 0.0.0.0:* LISTEN 2126/named tcp 0 0 192.168.18.2:53 0.0.0.0:* LISTEN 2126/named udp 0 0 192.168.18.2:53 0.0.0.0:* 2126/named udp 0 0 192.168.18.2:53 0.0.0.0:* 2126/named udp 0 0 127.0.0.1:53 0.0.0.0:* 2126/named udp 0 0 127.0.0.1:53 0.0.0.0:* 2126/named What am I missing, and why are most of my sockets showing up twice?
Edit: I forgot to mention - there's nothing in my logs about this.
avahi-daemonor a mDNS-enabledsystemd-resolvedrunning, either of those might block you from using the port 5353 unless specifically configured to not bind to IPs that will be assigned to containers. If you have a full virtual machine for yourself, then this should not apply. I would recommend using some other port number instead of 5353, to minimize the risk of conflicts with mDNS.