Configure BIND DNS Server to Listen Only On Certain IP Address or Network Interface

by on August 23, 2008 · 4 comments· LAST UPDATED August 23, 2008

in , ,

Q. I want to to configure named ( BIND DNS Sever ) to listens only on eth1 interface which has IP address How do I configure my named BIND DNS name server to listen only on certain network interface or IP address?

A. The listen-on option specifies IPv4 address to listen on. There is no interface specific option but IP is assigned to specific interface, so by specific IP you can force BIND to listen on certain IP or network interface.

listen-on syntax

IPv4 specific syntax is as follows to listen on; IP address:

listen-on {; };

To listen on all interfaces and IP (default)

listen-on { any; };

IPv6 option is as follows:

 listen-on-v6 { any; };
 listen-on-v6 { ipv-6-address; };

Here is sample configuration snapshot from named.conf file:

        //listen-on-v6 { any; };
        listen-on {; };
        directory "/var/named"; // the default
        dump-file               "data/cache_dump.db";
        statistics-file         "data/named_stats.txt";
        memstatistics-file      "data/named_mem_stats.txt";
        dnssec-enable yes;
        recursion no;
        allow-notify {;; };
        version "go away";
Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 4 comments… read them below or add one }

1 atmaraam December 5, 2009 at 11:59 am

i have static ip address 123.50178.82 and domain i want to configure a dns for my mail server with spf and mx record how i have to configure dns and mail server ?


2 Reynold P J August 11, 2010 at 1:13 pm

Thanks very helpful…..


3 Robert Poehler June 1, 2011 at 6:39 pm

Thank you for your article. Bind was only listen to and now it’s listening on all interfaces.


4 Anand October 5, 2013 at 12:41 pm

Thank you so much.
I am amazed that even these 5-6 year old posts are helping us in 2013.


Leave a Comment

Tagged as: , , , , , , , , , , , , ,

Previous Faq:

Next Faq: