PDA

View Full Version : BIND configuration problem


hunkybill
2005-04-03, 01:34 PM CDT
Hi,

I installed FC3 packages for bind-chroot-9.4.2 and proceeded to setup BIND. I have my static IP connected to the net via ppp0. My named.conf file in /var/name/chroot/etc contains a simple setup that seems to work.

// Default named.conf generated by install of bind-9.2.4-2
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};

controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

include "/etc/rndc.key";

zone "blahblah.ca" in {
type master;
file "/etc/blahblah.ca.hosts";
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "/etc/db.127.0.0";
};

zone "." in {
type hint;
file "/etc/db.cache";
};

My blahblah.ca.hosts file is as follows:

$ttl 38400
@ IN SOA ns1.blahblah.ca. me.blahblah.ca (
1093576163
10800
3600
432000
38400 )
;
TXT "blah is good"
NS ns1

localhost A 127.0.0.1

gw A 64.22.209.168
TXT "The router"

ns1 A 64.22.209.169
ns2 A 64.22.209.169

blahblah.ca. IN A 64.22.209.169


www.blahblah.ca. IN CNAME blahblah.ca.


When I run the command /etc/rc.d/init.d/named and check my log for messages it seems like named is up and running fine. I see the following anyway:

Apr 3 15:04:52 superfly named[6152]: starting BIND 9.2.4 -u named -t /var/named/chroot
Apr 3 15:04:52 superfly named[6152]: using 1 CPU
Apr 3 15:04:52 superfly named: named startup succeeded
Apr 3 15:04:52 superfly named[6152]: loading configuration from '/etc/named.conf'
Apr 3 15:04:52 superfly named[6152]: listening on IPv4 interface lo, 127.0.0.1#53
Apr 3 15:04:52 superfly named[6152]: listening on IPv4 interface eth0, 64.22.209.169#53
Apr 3 15:04:52 superfly named[6152]: listening on IPv4 interface ppp0, 64.22.193.180#53
Apr 3 15:04:52 superfly named[6152]: command channel listening on 127.0.0.1#953
Apr 3 15:04:52 superfly named[6152]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1
Apr 3 15:04:52 superfly named[6152]: zone blahblah.ca/IN: loaded serial 1093576163
Apr 3 15:04:52 superfly named[6152]: running
Apr 3 15:04:52 superfly named[6152]: zone 0.0.127.in-addr.arpa/IN: sending notifies (serial 1)
Apr 3 15:04:52 superfly named[6152]: received notify for zone '0.0.127.in-addr.arpa'

So I am pretty sure my configuration should be OK for this simple case. However, nothing seems to work when I try and do nslookup blahblah.ca or ping or tracert... I always get messages that the no DNS servers were found.

I am baffled as to how to debug this situation. I have opened incoming ports 53 and 953 on my firewall, and currently have no restrictions on outgoing ports... so I am curious as to how to get my DNS to work. blahblah is not my real domain... but I registered my real domain and pointed its nameservers to my IP in the blahblah.ca.hosts file..

Any tips most appreciated!!

jim
2005-04-03, 01:40 PM CDT
what is in /etc/resolv.conf ?

hunkybill
2005-04-03, 03:00 PM CDT
My /etc/resolv.conf contains two entries that are the nameservers of the ISP providing me connectivity and my subnet...

nameserver 69.XX.239.YY
nameserver 69.XX.239.YY

Should there be something else in there?

BTW: I just used the named-checkzone and named-checkconf to verify the status of my files. A little tweaking and no errors occur with them now. the difference in the logs is now as follows:

Apr 3 17:16:57 superfly named[6561]: starting BIND 9.2.4 -u named -t /var/named/chroot
Apr 3 17:16:57 superfly named[6561]: using 1 CPU
Apr 3 17:16:57 superfly named[6561]: loading configuration from '/etc/named.conf'
Apr 3 17:16:57 superfly named[6561]: listening on IPv4 interface lo, 127.0.0.1#53
Apr 3 17:16:57 superfly named[6561]: listening on IPv4 interface eth0, 64.22.209.169#53
Apr 3 17:16:57 superfly named[6561]: listening on IPv4 interface ppp0, 64.22.193.180#53
Apr 3 17:16:57 superfly named[6561]: command channel listening on 127.0.0.1#953
Apr 3 17:16:57 superfly named[6561]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1
Apr 3 17:16:57 superfly named[6561]: zone blahblah.ca/IN: loaded serial 2001062501
Apr 3 17:16:57 superfly named[6561]: running
Apr 3 17:16:57 superfly named[6561]: zone 0.0.127.in-addr.arpa/IN: sending notifies (serial 1)
Apr 3 17:16:57 superfly named[6561]: zone blahblah.ca/IN: sending notifies (serial 2001062501)
Apr 3 17:16:57 superfly named[6561]: received notify for zone '0.0.127.in-addr.arpa'
Apr 3 17:16:57 superfly named: named startup succeeded
Apr 3 17:16:58 superfly named[6561]: received notify for zone 'blahblah.ca'


Once again... no response from nslookup or outside my subnet... DNS is running I assume but not answering the bell... any more things I should be checking here ???

Thanks!!!

smittyjr18
2005-04-05, 06:26 AM CDT
I'm really new to Linux but i'm pretty sure that you need to make sure that your resolv.conf looks something like this:

nameserver 127.0.0.1
or
nameserver (IP of your eth0)(64.22.209.169)

Maayan
2005-04-05, 06:45 AM CDT
Please search for a file named "blahblah.ca.hosts.jnl". This is the journal file for the zone.
Stop named, delete the jnl file and restart named. Also paste here the output of:
# nslookup www.blahblah.ca 127.0.0.1

jim
2005-04-05, 08:20 AM CDT
[jim@JimsNotebook ~]$ cat /etc/resolv.conf
; generated by NetworkManager, do not edit!

search rochester.rr.com

nameserver 24.93.1.118
nameserver 24.92.226.180
nameserver 24.93.1.120
[jim@JimsNotebook ~]$


Notice mind has the entry search my ISP for DNS servers

do you have named running ?
stop named
service named stop
try to connect again
and see if your /etc/resolv.conf changes

blammo
2005-04-05, 08:42 AM CDT
I'm really new to Linux but i'm pretty sure that you need to make sure that your resolv.conf looks something like this:

nameserver 127.0.0.1
or
nameserver (IP of your eth0)(64.22.209.169)

This is correct. Although you still won't be able to resolve outside of the local network. Try putting this is your named.conf at the top under options:
forwarders {
x.x.x.x;
x.x.x.x;
};
with these being the IP addresses of the ISP's DNS servers.