I'm facing a serious problem which has knocked out my server.
For some unknown reason, named is no longer working, despite doing my best to remediation the issues found on the logs.
I get this error whenever I try to run the rebuilddnsconfig (cpanel)
warn [fixrndc] /usr/sbin/rndc status failed: rndc: connect failed: 127.0.0.1#953: connection refused
And when I check the status of named:
root@host [/etc]# /etc/init.d/named status
rndc: connect failed: 127.0.0.1#953: connection refused
This is my /var/log/messages tail
root@host [/etc]# tail /var/log/messages
Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1, 108.xx.18.18#53
Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp1, 108.xx.18.19#53
Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp2, 108.xx.18.20#53
Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp3, 108.xx.18.21#53
Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp4, 108.xx.18.22#53
Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp5, 108.xx.18.23#53
Nov 24 22:32:25 host named[21687]: command channel listening on 127.0.0.1#953
Nov 24 22:32:25 host named[21687]: couldn't open pid file '/var/run/named/named.pid': Permission denied
Nov 24 22:32:25 host named[21687]: exiting (due to early fatal error)
Nov 24 22:32:25 host /etc/init.d/named: named startup succeeded
My configs are given these permissions:
root@host [/etc]# ls -lh | grep named.conf
-rw-r--r-- 1 named root 4.9K Nov 24 22:11 named.conf
My named.conf has the following code: (minus zones)
include "/etc/rndc.key";
controls {
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};
options {
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/
// query-source port 53;
recursion no;
/* We no longer enable this by default as the dns posion exploit
has forced many providers to open up their firewalls a bit */
// Put files that named is allowed to write in the data/ directory:
directory "/var/named"; // the default
pid-file "/var/run/named/named.pid";
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
/* memstatistics-file "data/named_mem_stats.txt"; */
allow-transfer { "none"; };
};
The permissions on rndc:
root@host [/etc]# ls -lh | grep rndc
-rw-rw---- 1 named named 479 Nov 24 21:29 rndc.conf
-rw-rw---- 1 named named 479 Nov 24 21:16 rndc.conf.bak
-rw-rw---- 1 named named 77 Nov 24 21:29 rndc.key
My Named Folder Permissions:
ls -lh /var/run/named/
total 8.0K
drwxrwxr-x 2 named named 4.0K Jan 7 2013 ./
drwxrwx--- 22 root root 4.0K Nov 24 22:29 ../
Is there anything that stands out here?
Thanks for your help!