Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Mon Nov 11, 2019 11:49 pm


Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
 
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
     

Topic review - Configure bind (named server) to listen on localhost on Debian
Author Message
Post subject: Configure bind (named server) to listen on localhost on Debian  |  Post Posted: Tue Jun 01, 2010 5:16 pm
By default on a Debian distro, named daemon listens on all available interfaces. In order to change it to listen on a specific IP address or localhost, edit the named.conf.options

Code:
# vim /etc/bind/named.conf.options
options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // forwarders {
        //      0.0.0.0;
        // };

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
        listen-on { 127.0.0.1; };
};


The following line instructs bind to listen on localhost:
Code:
   listen-on { 127.0.0.1; };


It needs to be added inside the options directive.

Restart bind and use lsof to check the IP it listens on:
Code:
# lsof -Pni :53
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
named   21998 bind   20u  IPv4 107435      0t0  TCP 127.0.0.1:53 (LISTEN)
named   21998 bind  512u  IPv4 107434      0t0  UDP 127.0.0.1:53
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO