[SOLVED] bind 9 zone not transferring without "service named restart"
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
zone "." IN {
type hint;
file "named.ca";
};
zone"test.com" IN {
type slave;
file "slaves/test.fwd.zone";
masters { 10.0.0.101; };
};
zone"0.0.10.in-addr.arpa" IN {
type slave;
file "slaves/test.rev.zone";
masters { 10.0.0.101; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
===================================================
[root@ns1 ~]# cat /var/named/test.fwd.zone
$TTL 1D
@ IN SOA ns1.test.com. root.test.com (
201803173 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS ns1.test.com.
@ IN NS ns2.test.com.
@ IN A 10.0.0.101
@ IN A 10.0.0.102
; machines in domain
@ IN A 10.0.0.103
@ IN A 10.0.0.104
@ IN A 10.0.0.105
@ IN A 10.0.0.106
ns1 IN A 10.0.0.101
ns2 IN A 10.0.0.102
node1 IN A 10.0.0.103
node2 IN A 10.0.0.104
node3 IN A 10.0.0.105
node4 IN A 10.0.0.106
===================================================
[root@ns1 ~]# cat /var/named/test.rev.zone
$TTL 1D
@ IN SOA ns1.test.com. root.test.com (
201803173; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
;name server
@ IN NS ns1.test.com.
@ IN NS ns2.test.com.
@ IN PTR test.com.
@ IN A 10.0.0.101
@ IN A 10.0.0.102
101 IN PTR ns1.test.com.
102 IN PTR ns2.test.com.
;machines in domain
103 IN PTR node1.test.com.
104 IN PTR node2.test.com.
105 IN PTR node3.test.com.
106 IN PTR node4.test.com.
===================================================
Thanks in Advance,
Gaurav Bhatkar
Last edited by gauravbhatkar; 03-19-2018 at 12:18 AM.
The zonefiles look good. (Just a cosmetic note: you don't need A RRs in the reverse zone).
Are you sure that you reload the zone at master after editing the zonefile and increasing the serial?
And again, enable AXFR logging and see if you get something...
I have to manually restart named service for performing zone transfer.
Hi @tshikose both udp and tcp port 53 is open on both the servers.
[root@ns1 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
also, I have changed refresh time in zone files as below:-
======================================================
[root@ns1 ~]# cat /var/named/test.fwd.zone
$TTL 1D
@ IN SOA ns1.test.com. root.test.com (
201803178 ; serial 1M ; refresh
[root@ns1 ~]# cat /var/named/test.rev.zone
$TTL 1D
@ IN SOA ns1.test.com. root.test.com (
201803178; serial 1M ; refresh
======================================================
[root@ns2 ~]# cat /var/named/slaves/test.fwd.zone
$ORIGIN .
$TTL 86400 ; 1 day
test.com IN SOA ns1.test.com. root.test.com.test.com. (
201803177 ; serial 60 ; refresh (1 minute)
[root@ns2 ~]# cat /var/named/slaves/test.rev.zone
$ORIGIN .
$TTL 86400 ; 1 day
0.0.10.in-addr.arpa IN SOA ns1.test.com. root.test.com.0.0.10.in-addr.arpa. (
201803177 ; serial 60 ; refresh (1 minute)
======================================================
Hi @bathory I have changed named.conf file as suggested, however, logs showing the same result as /var/log/message.
every time I have to manually restart named service for zone transfer.
Regards,
Gaurav Bhatkar
Last edited by gauravbhatkar; 03-19-2018 at 11:57 PM.
I have to manually restart named service for performing zone transfer.
I'm asking you once again:
Do you reload the zone after making the changes in the zonefile?
After editing a zonefile, you need to issue a:
Code:
rndc reload test.com
This will read the zonefile, will find the serial increased and will send notifies to slave(s). Then they in return will do the fresh zone transfer.
Of course the same can be done by restarting named, that is an overkill in your case.
Thanks for the solution it worked, zone transferred successfully.
However, I thought zone transfer is automatic process and triggers when the serial number changes.
However, I thought zone transfer is automatic process and triggers when the serial number changes.
This is not the case for dynamic zones.
Updating a dynamic zone using nsupdate for example, creates a journal file that keeps the new/updated records for some time and then it updates the real zone file.
Read this to better understand the mechanism.
In your case, you are manually editing the zone file, so you need the above sequence of rndc commands in order to reload the zone for the changes to apply.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.