Forum Moderators: bakedjake

Message Too Old, No Replies

DNS Server starting listening on all IP Addresses

How to make DNS Server listen on assigned IP Addresses?

         

sunny45

2:58 am on Aug 15, 2005 (gmt 0)

10+ Year Member



Hi,

I have a Linux Box configured with 4 IP addresses on the same network card. (eth1, eth1:0, eth1:1, eth1:2 )

Of these the IP Addresses assigned to eth1:0 and eth1:1, are being used for DNS Server (ns1.domain.com and ns2.domain.com)

But then every time i start the BIND DNS Server, it's listen on Port 53 on all the IP Addresses. Here's what i get in logs,

Aug 14 19:21:26 hostname named[23318]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 14 19:21:26 hostname named[23318]: listening on IPv4 interface eth1, IP.IP.IP.IP1#53
Aug 14 19:21:26 hostname named[23318]: listening on IPv4 interface eth1:0, IP.IP.IP.IP2#53
Aug 14 19:21:26 hostname named[23318]: listening on IPv4 interface eth1:1, IP.IP.IP.IP3#53
Aug 14 19:21:26 hostname named[23318]: listening on IPv4 interface eth1:2, IP.IP.IP.IP4#53

I was wondering how do i limit BIND DNS Server to listen to only 2 IP Addresses on Port 53 and not on all.

Thanks again for your help in advance.

Thanks
Sunny

ChadSEO

3:56 pm on Aug 15, 2005 (gmt 0)

10+ Year Member



Sunny,

Welcome to WebmasterWorld!

The parameter that you are looking for is "listen-on". It goes inside the "options" block in your named.conf file. An example of the directive looks like:

listen-on { 1.2.3.4; 5.6.7.8; };

This allows you to specify which address to listen to. You can also specify a port, but it will default to 53.

Hope this helps!

Chad

sunny45

7:08 am on Aug 17, 2005 (gmt 0)

10+ Year Member



Thanks ChadSEO. That was perfect. It worked ;)