Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have configured successfully my master DNS server (192.168.1.254) on red hat linux enterprise 4 .I have also create my slave DNS server (192.168.1.253) but unfoertunately the slave DNS server is not coping the Zone database files in
/var/named/chroot/var/named
Following is my slave forward and reverse
Code:
zone “mydomain.com” IN {
type slave;
file “mydomain.com.fwd”;
masters {192.168.1.254; };
};
zone “1.168.192.in-addr.arpa” IN {
type slave;
file “mydomain.com.rev” ;
masters {192.168.1.254; };
};
Following is the master
Code:
zone "mydomain.com" IN {
type master;
file "mydomain.com.fwd";
allow-transfer { 192.168.1.253; 192.168.1.254; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "mydomain.com.rev";
allow-transfer { 192.168.1.253; 192.168.1.254; };
};
please help me why not the zone batabase not transfering. I have disable the firewall also and open only port 53,even restart named.conf file but still no success.
thanks
;; AUTHORITY SECTION:
mydomain.com. 86400 IN NS ns1.mydomain.com.
Looks like your secondary dns is not present in the NS records, as it's not listed in the authority section above.
You didn't post the zone files, but you should make sure you have both NS records defined:
[root@ns1 named]#vi@mydomain.com.fwd
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. admin)
3H ;refresh
15M ;retry
1W ;expire
1D ;minimum
IN NS localhost
localhost IN A 127.0.0.1
Reverse Zone
Code:
[root@ns1 named]#vi@mydomain.com.fwd
$ORIGIN mydomain.com.
$TTL 86400
@ IN SOA ns1.mydomain.com. admin@mydomain.com (
20100722 ; serial (d. admin)
3H ;refresh
15M ;retry
1W ;expire
1D ;minimum
@ IN NS ns1.mydomain.com.
@ IN MX 10 ns1.mydomain.com.
ns1.mydomain.com. IN A 192.168.1.254
www IN CNAME ns1
pc1.mydomain.com IN A 192.168.1.1
The zone files are not correct, or you've mixed 'em during copy/paste. Anyway you can use the following
Forward:zone
Code:
$TTL 86400
@ IN SOA ns1.mydomain.com. root.localhost (
42 ; serial (d. admin)
3H ;refresh
15M ;retry
1W ;expire
1D ;minimum
IN NS ns1.mydomain.com.
IN NS ns2.mydomain.com.
IN MX 10 ns1.mydomain.com.
ns1 IN A 192.168.1.254
ns2 IN A 192.168.1.253
www CNAME ns1
pc1 IN A 192.168.1.1
;If you want to define localhost add a trailing dot
localhost. IN A 127.0.0.1
Reverse zone
Code:
$TTL 86400
$ORIGIN 1.168.192.in-addr.arpa
@ IN SOA ns1.mydomain.com. admin.mydomain.com (
20100722 ;serial (d. admin)
3H ;refresh
15M ;retry
1W ;expire
1D ;minimum
IN NS ns1.mydomain.com.
IN NS ns2.mydomain.com.
1 PTR pc1.mydomain.com.
254 PTR ns1.mydomain.com.
253 PTR ns1.mydomain.com.
Increase both serial numbers and restart bind.
And check logs if it send any NOTIFY to the slave.
thanks "bathory" I have checked it but still i can't see the zone file in my slave server.
My updated forward file is
Code:
[root@ns1 named]#vi@mydomain.com.fwd
$ORIGIN mydomain.com.
$TTL 86400
@ IN SOA ns1.mydomain.com. admin@mydomain.com (
20100722 ; serial (d. admin)
3H ;refresh
15M ;retry
1W ;expire
1D ;minimum
@ IN NS ns1.mydomain.com.
@ IN MX 10 ns1.mydomain.com.
ns1.mydomain.com. IN A 192.168.1.254
ns2.mydomain.com. IN A 192.168.1.253
www IN CNAME ns1
pc1.mydomain.com IN A 192.168.1.1
localhost. IN A 127.0.0.1
kindly any idea that why the zone files are not coping in slave DNS server.Definately something from my end will be wronge but i am unable catch my mistake.
thanks a lot for your kind help. well i am sure that it was the mistake in
IN NS ns2.mydomain.com. which I was missing every time. Well can you en light that
You can omit @ as it's implied. Same goes for IN.
But if you omit it you need to leave at least a blank space. If you want you can read about @ and blank substitution here
If your problem is solved, you can mark the thread "Solved" using Thread tools on top of the page
thanks "bathory" a lot for your all post. Well your each post is so much informative and you identify where i am doing mistake.I shall try it later and will know you that according to your post the zone have been transfered or not.
I have added my secondary record @ IN NS ns2.mydomain.com. but still the files are not copied to the slave DNS server.raviteja_s as you mentioned to added that add files in slaves directory .In my slave DNS server I have already added the following on
[root@ns2 ~] # vi /etc/named.conf
Code:
zone “mydomain.com” IN {
type slave;
file “mydomain.com.fwd”;
masters {192.168.1.254; };
};
zone “1.168.192.in-addr.arpa” IN {
type slave;
file “mydomain.com.rev” ;
masters {192.168.1.254; };
};
so i should remove these entries in this file which is in /etc/named.conf and create it under /var/named/chroot/var/named/slaves
To test your nameservers, change something in the forward zone of master, increase serial and reload bind.
Watch the master logs, if it send notifies and if it gets an IXFR from slave
Watch the slave logs if the zone is updated
Here is what actually happens:
Quote:
master
Oct 4 10:19:04 ns1 named[3148]: zone domain.com/IN/external: loaded serial 2008082006
Oct 4 10:19:04 ns1 named[3148]: zone domain.com/IN/external: sending notifies (serial 2008082006)
Oct 4 10:19:04 ns1 named[3148]: client x.x.x.x#37576: view external: transfer of 'domain.com/IN': AXFR-style IXFR started
Oct 4 10:19:04 ns1 named[3148]: client x.x.x.x#37576: view external: transfer of 'domain.com/IN': AXFR-style IXFR ended
slave
04-Oct-2010 10:19:04.198 xfer-in: info: transfer of 'domain.com/IN' from x.x.x.x#53: connected using 192.168.1.50#37576
04-Oct-2010 10:19:04.291 xfer-in: info: transfer of 'domain.com/IN' from x.x.x.x#53: Transfer completed: 1 messages, 8 records, 224 bytes, 0.091 secs (2461 bytes/sec)
Note:
1. The clocks in both master and slave must be synchronized (IIRC they must not have +5min difference)
2. You can do a manual zone transfer (since you use allow-transfer in master) using
Code:
dig -t AXFR mydomain.com @192.168.1.254
3. The zone files in slave, will be created automatically if bind has write permissions on the working directory. You can redirect the above command to the slave zone file mydomain.com.fwd and change ownership to bind user.group
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.