LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Configure named server (https://www.linuxquestions.org/questions/linux-software-2/configure-named-server-371518/)

DanielTan 10-10-2005 09:18 AM

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

sshoemaker 10-10-2005 11:08 AM

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....

sshoemaker 10-10-2005 11:09 AM

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.

DanielTan 10-10-2005 07:25 PM

Re: named server configuration
 
Hi, does localhost.zone same as db.127.0.0 ? db.cache same as named.local ?

Rgds
Daniel


Quote:

Originally posted by sshoemaker
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....


sshoemaker 10-11-2005 08:15 AM

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.

DanielTan 10-11-2005 11:08 AM

Re: named sdrver...
 
Hi, what abt db.127.0.0 ? similar as db.cache ?

Rgds
Daniel


Quote:

Originally posted by sshoemaker
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.


sshoemaker 10-11-2005 11:10 AM

named server...
 
your db.127.0.0 is the reverse file. so it's the samed as the named.local

DanielTan 10-11-2005 11:24 AM

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:

Originally posted by sshoemaker
your db.127.0.0 is the reverse file. so it's the samed as the named.local

sshoemaker 10-11-2005 11:27 AM

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.

DanielTan 10-11-2005 07:14 PM

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:

Originally posted by sshoemaker
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.


sshoemaker 10-12-2005 09:32 AM

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.