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

FAQ
It is currently Wed Oct 04, 2023 10:51 pm


Guides and tutorials for Red Hat Linux, Debian, Suse and others.

Author Message
debuser
Post  Post subject: Configure bind (named server) to listen on localhost on Debian  |  Posted: Tue Jun 01, 2010 5:16 pm

Joined: Thu Aug 06, 2009 2:48 am
Posts: 105

Offline
 

Configure bind (named server) to listen on localhost on Debian

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





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Configure bind (named server) to listen on localhost on Debian"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Debian: Quick dpkg query commands

debuser

0

2602

Thu Aug 06, 2009 7:16 am

debuser View the latest post

There are no new unread posts for this topic. How to change crontab editor in Debian Linux

mandrei99

1

7117

Tue Mar 08, 2016 6:53 pm

tsuchan View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
cronNews 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