redcamel

Member
Jun 23, 2005
14
0
151
I got an email from WHM that my server’s IP resolved to “.” I went to correct the problem via ssh, however when looking in /var/named all my zone files were gone. I then logged into WHM and could see the zones there. Where are my zone files at? Why can I see them in WHM and not in a shell?
 

aby

Well-Known Member
May 31, 2005
638
0
166
India
redcamel said:
I got an email from WHM that my server’s IP resolved to “.” I went to correct the problem via ssh, however when looking in /var/named all my zone files were gone. I then logged into WHM and could see the zones there. Where are my zone files at? Why can I see them in WHM and not in a shell?
Did you try a locate command from shell and see if the zone files are there?
 

redcamel

Member
Jun 23, 2005
14
0
151
When I use ls in the /var/named directory there are no .db files. They were here before not sure why I can't find them, but DNS appears to be ok? Are the files in a differant directory wiht WHM 10.6.0
 

Zaf

Well-Known Member
Aug 22, 2005
117
0
166
redcamel said:
When I use ls in the /var/named directory there are no .db files. They were here before not sure why I can't find them, but DNS appears to be ok? Are the files in a differant directory wiht WHM 10.6.0
Just repeating what Aby said there. Try this:
# locate -u
# locate domain.tld.db

Replace domain.tld with any domain name hosted on your server e.g. # locate abcdef.com.db
 

aby

Well-Known Member
May 31, 2005
638
0
166
India
redcamel said:
They are in the /etc directory! But why and how???

I guess your OS is freebsd. There the zone files are found at
/etc/namedb
and you normally have a link from that directory to /var/named
 

redcamel

Member
Jun 23, 2005
14
0
151
Nope....CentOS. They were in the /var/named, but somehow they have been moved to /etc. Any ideas?
 

avijit

Well-Known Member
Jul 26, 2004
116
0
166
India
Check the /etc/named.conf

Where are the zone files are being kept ?

Does it look like :
Code:
zone "localhost" IN {
        type master;
        file "/var/named/localhost.zone";
        allow-update { none; };
};
or

Code:
zone "localhost" IN {
        type master;
        file "/etc/localhost.zone";
        allow-update { none; };
};

Is the ...

Code:
options {
        directory "/var/named";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
};
Changed to ..

Code:
options {
        directory "/etc";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
};