Configure named server
I am configuring caching named server and file "db.127.0.0" . I follow advise from a website that i need to create this db.127.0.0 and add below lines to it
but i get error message "Zone file initialization error. ....zone 0.0.127.in-addr-arpa/IN: has no NS records". Pls advise. Thanks $TTL 345600 @ IN SOA localhost. root.localhost. ( 00 ; Serial 86400 ; Refresh 7200 ; Retry 2592000 ; Expire 345600 ) ; Minimum IN NS localhost. 1 IN PTR localhost. Rgds Daniel |
named server configuration
something like this for named.conf file
options { directory "/var/named"; pid-file "/var/named/named.pid"; allow-query { 127.0.0.1; }; allow-transfer { none; }; listen-on { 127.0.0.1; }; }; zone "localhost" IN { type master; file "localhost.zone"; }; zone "." in { type hint; file "named.ca"; }; zone "0.0.127.in-addr.arpa" in { type master; file "named.local"; }; something like this for the localhost.zone file $TTL 86400 $ORIGIN localhost. @ 1D IN SOA @ root ( 2005101000; serial YYYYMMDDnn 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum 1D IN NS @ 1D IN A 127.0.0.1 something like this for the named.local file $TTL 86400 @ IN SOA localhost. root.localhost. ( 2005101000 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS localhost. 1 IN PTR localhost. This should work for you.... |
named server configuration
One more thing... make sure if you change anything in the zone files that you increment the serial #.. otherwise changes will not show up.
|
Re: named server configuration
Hi, does localhost.zone same as db.127.0.0 ? db.cache same as named.local ?
Rgds Daniel Quote:
|
named sdrver...
I think the db.cache is the same as "named.ca" -- it's the cache of the root servers.
the localhost.zone is the forward of the localhost zone and the named.local is the reverse of the localhost zone. |
Re: named sdrver...
Hi, what abt db.127.0.0 ? similar as db.cache ?
Rgds Daniel Quote:
|
named server...
your db.127.0.0 is the reverse file. so it's the samed as the named.local
|
Re: named server...
So if i already have named.local then i do not have to have db.127.0.0 , right ? also where are the cached dns entries records in dns console ? i want to check all those site IP and etc i have browsed. Thanks
Rgds Daniel Quote:
|
named server...
right.. if you have the named.local you don't need the db.127.0.0 file.
I'm not sure where the cache is stored... I would suppose in memory, but I wouldn't suppose it can be browsed. If it was in plain text it would take a long time to parse. |
Re: named server...
Hi, doesn't it have cached entries like in Windows cache DNS ? then how do we know it is cached ?
Rgds Daniel Quote:
|
named server
add the following line to your /etc/resolv.conf file
nameserver 127.0.0.1 Also make sure that your /etc/nsswitch.conf file has the following like or something similar including dns hosts: files dns When you start named you should see the following (or something like it in your messages file) Dec 23 02:21:12 lookfar named[11031]: starting BIND 9.1.3 Dec 23 02:21:12 lookfar named[11031]: using 1 CPU Dec 23 02:21:12 lookfar named[11034]: loading configuration from \ '/etc/named.conf' Dec 23 02:21:12 lookfar named[11034]: the default for the \ 'auth-nxdomain' option is now 'no' Dec 23 02:21:12 lookfar named[11034]: no IPv6 interfaces found Dec 23 02:21:12 lookfar named[11034]: listening on IPv4 interface lo, \ 127.0.0.1#53 Dec 23 02:21:12 lookfar named[11034]: listening on IPv4 interface eth0, \ 10.0.0.129#53 Dec 23 02:21:12 lookfar named[11034]: command channel listening on \ 127.0.0.1#953 Dec 23 02:21:13 lookfar named[11034]: running Then to test it $ dig google.com ; <<>> DiG 9.2.1 <<>> google.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54001 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;google.com. IN A ;; ANSWER SECTION: google.com. 300 IN A 216.239.37.99 google.com. 300 IN A 216.239.57.99 ;; Query time: 8 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Oct 12 10:29:56 2005 ;; MSG SIZE rcvd: 60 |
All times are GMT -5. The time now is 01:09 AM. |