Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-03-2005, 08:00 PM   #1
LQ Newbie
Registered: Aug 2003
Distribution: Gentoo
Posts: 28

Rep: Reputation: 15
Problem with BIND - Can't resolve hostnames unless listen-on is set to the IP range


I'd never run into problems with BIND before. Well, OK, I have run into problem with BIND numerous times but this one is a bit wierd... The server can resolve hostnames properly (with /etc/resolv.conf pointing to but other computers on the same (private) subnet cannot.

At first I thought that maybe I should set allow-query to "any". This didn't work.

What did work however, was including my subnet in the listen-on configuration option:

        listen-on-v6 { none; };
        listen-on {;; };
This just doesn't make sense though! Listen-on is supposed to bind the local named process to a specific port/IP address (I think) so that multiple virtual name servers can be set up on the same machine (by using IP aliases and/or multiple interfaces if the former is not possible)

Here's my named.conf config anyway (in fact it's the default one after emerging BIND in gentoo. And yes, I did uncomment the allow-query part when testing)

options {
        directory "/var/bind";

        // uncomment the following lines to turn on DNS forwarding,
        // and change the forwarding ip address(es) :
        //forward first;
        //forwarders {

        listen-on-v6 { none; };
        listen-on {;; };

        // to allow only specific hosts to use the DNS server:
        // allow-query {
        // any;
        // };

        // if you have problems and are behind a firewall:
        //query-source address * port 53;
        pid-file "/var/run/named/";

zone "." IN {
        type hint;
        file "";

zone "localhost" IN {
        type master;
        file "pri/";
        allow-update { none; };
        notify no;

zone "" IN {
        type master;
        file "pri/";
        allow-update { none; };
        notify no;
Old 07-03-2005, 08:27 PM   #2
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
listen-on {;; };

I have always specifed the ip address for the listen-on statement.

Do the other hosts ip addresses on your lan IP fall within .1 ->30...
[root@excelsior etc]# ipcalc --netmask --network --broadcast
[root@excelsior etc]#
What is the output of "netstat -rn" ? How about on the other hosts? Do the ip/network/netmask addresses match?
Old 07-07-2005, 04:56 PM   #3
LQ Newbie
Registered: Aug 2003
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks for your answer

I consider it highly unlikely to be a routing/subneting problem. Yes all hosts fall into the subnet.
Here's the output of netstat -rn:

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface U 0 0 0 eth0 U 0 0 0 eth1 UG 0 0 0 lo UG 0 0 0 eth0

And if there were a problem with hosts not being part of the same subnet, then why did the listen-on statement solve the problem? The question is, why is it that I have to set listen-on to my subnet range?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to resolve any hostnames, including localhost calamari Linux - Networking 10 11-02-2005 01:17 PM
Cannot resolve hostnames BobBuchanan Linux - Networking 1 02-12-2005 05:56 PM
Can't resolve hostnames....need help shaggystyle Linux - Networking 2 08-28-2004 02:20 AM
pppoe seems to connect but cant resolve hostnames mecister Linux - Networking 2 06-23-2004 06:32 PM
resolve hostnames zero_kewl Linux - General 5 09-01-2003 04:00 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration