lazyant
09-02-2005, 10:08 PM
Hello,
first of all I don't need to run DNS; my domains are resolved fine thru rimuhost's DNS servers. But I was playing with getting an internal cache-only DNS server (both by hand and with Webmin) and the problem is that I cannot connect to it; I found two symptoms:
1) I have an /etc/named.conf file with just the line: include "/etc/rndc.key";
When I change some DNS settings in Webmin, they are stored in /var/named/chroot/etc/named.conf (whole structure: # ls -R /var/named ) but this last file is not used when starting DNS server with: # service named start; this command returns OK and # tail /var/log/messages says:
...named[14067]: starting BIND 9.2.4 -u named
...named[14067]: using 1 CPU
...named[14069]: loading configuration from '/etc/named.conf'
...named[14069]: listening on IPv4 interface lo, 127.0.0.1#53
...named[14069]: listening on IPv4 interface eth0, 207.210.218.122#53
...named[14069]: command channel listening on 127.0.0.1#953
...named[14069]: command channel listening on ::1#953
...named[14069]: running
...named: named startup succeeded
I also checked writing some garbage in both named.conf files and starting named only complaints of syntax errors from /etc/named.conf
2) The second problem is that I cannot stop gracefully named. If I try # service named stop it times out. Looking into the initialization script, what it's doign is calling /usr/sbin/rndc stop, and if I run that comamnd manually it will say: rndc: connect failed
That's actually the problem, I could never connect to my DNS server (regardless of config settings) using for instance # dig @localhost somedomain.com or nslookup.
The named processes show up in # ps aux|grep named:
named 14067 0.0 2.7 11540 2604 ? Ss 17:50 0:00 /usr/sbin/named -u named
named 14068 0.0 2.7 11540 2604 ? S 17:50 0:00 /usr/sbin/named -u named
named 14069 0.0 2.7 11540 2604 ? S 17:50 0:00 /usr/sbin/named -u named
named 14070 0.0 2.7 11540 2604 ? S 17:50 0:00 /usr/sbin/named -u named
named 14071 0.0 2.7 11540 2604 ? S 17:50 0:00 /usr/sbin/named -u named
And the server seems to be listening: # netstat -pl gives:
tcp 0 0 my.com:domain *:* LISTEN 14067/named
tcp 0 0 localhost:domain *:* LISTEN 14067/named
tcp 0 0 localhost:rndc *:* LISTEN 14067/named
tcp 0 0 ::1:rndc *:* LISTEN 14067/named
udp 0 0 my.com:domain *:* 14067/named
udp 0 0 localhost:domain *:* 14067/named
udp 0 0 *:2533 *:* 14067/named
udp 0 0 *:2534 *:* 14067/named
Also, in Webmin it says that DNS is not started, and when I click on "start" it will say: "Error, DNS is already started".
any suggestions?
thanks
first of all I don't need to run DNS; my domains are resolved fine thru rimuhost's DNS servers. But I was playing with getting an internal cache-only DNS server (both by hand and with Webmin) and the problem is that I cannot connect to it; I found two symptoms:
1) I have an /etc/named.conf file with just the line: include "/etc/rndc.key";
When I change some DNS settings in Webmin, they are stored in /var/named/chroot/etc/named.conf (whole structure: # ls -R /var/named ) but this last file is not used when starting DNS server with: # service named start; this command returns OK and # tail /var/log/messages says:
...named[14067]: starting BIND 9.2.4 -u named
...named[14067]: using 1 CPU
...named[14069]: loading configuration from '/etc/named.conf'
...named[14069]: listening on IPv4 interface lo, 127.0.0.1#53
...named[14069]: listening on IPv4 interface eth0, 207.210.218.122#53
...named[14069]: command channel listening on 127.0.0.1#953
...named[14069]: command channel listening on ::1#953
...named[14069]: running
...named: named startup succeeded
I also checked writing some garbage in both named.conf files and starting named only complaints of syntax errors from /etc/named.conf
2) The second problem is that I cannot stop gracefully named. If I try # service named stop it times out. Looking into the initialization script, what it's doign is calling /usr/sbin/rndc stop, and if I run that comamnd manually it will say: rndc: connect failed
That's actually the problem, I could never connect to my DNS server (regardless of config settings) using for instance # dig @localhost somedomain.com or nslookup.
The named processes show up in # ps aux|grep named:
named 14067 0.0 2.7 11540 2604 ? Ss 17:50 0:00 /usr/sbin/named -u named
named 14068 0.0 2.7 11540 2604 ? S 17:50 0:00 /usr/sbin/named -u named
named 14069 0.0 2.7 11540 2604 ? S 17:50 0:00 /usr/sbin/named -u named
named 14070 0.0 2.7 11540 2604 ? S 17:50 0:00 /usr/sbin/named -u named
named 14071 0.0 2.7 11540 2604 ? S 17:50 0:00 /usr/sbin/named -u named
And the server seems to be listening: # netstat -pl gives:
tcp 0 0 my.com:domain *:* LISTEN 14067/named
tcp 0 0 localhost:domain *:* LISTEN 14067/named
tcp 0 0 localhost:rndc *:* LISTEN 14067/named
tcp 0 0 ::1:rndc *:* LISTEN 14067/named
udp 0 0 my.com:domain *:* 14067/named
udp 0 0 localhost:domain *:* 14067/named
udp 0 0 *:2533 *:* 14067/named
udp 0 0 *:2534 *:* 14067/named
Also, in Webmin it says that DNS is not started, and when I click on "start" it will say: "Error, DNS is already started".
any suggestions?
thanks