<div dir="ltr"><div>Hello. I am hoping that someone can help me to figure out the cause of an issue I am seeing when running nsupdate on my BIND9 server.</div><div>Below you will find all the the details as to how my server is configured and also the nsupdate commands that I am running.</div><div><br></div><div>The issue I am seeing is that I have configured a /16 10.10.in-addr.arpa reverse zone, however when I execute nsupdate the 10.10.in-addr.arpa.dns zone file re formats the $ORIGIN to a /24 156.10.10.in-addr.arpa.<br></div><div>This appears to be an issue with nsupdate rather than BIND itself as I can manually amend the 10.10.in-addr.arpa.dns zone file whcih always remains in a /16 format.</div><div><br></div><div>Please see below for details and if you need any further information please let me know.<br></div><div><br></div><div>###############################</div>named.conf<br>###############################<br>greg@hp-linux:/etc/bind$ cat named.conf<br>##  OPTIONS<br>options {<br>directory "/var/cache/bind";<br><br>        recursion no;<br>listen-on port 53 { any; };<br>allow-query  { any; };<br>allow-update { any; };<br><br>forwarders {<br>10.10.8.120;<br>10.196.207.11;<br>};<br><br>dnssec-validation auto;<br><br>auth-nxdomain no;    # conform to RFC1035<br>listen-on-v6 { any; };<br>};<br><br><br>## ZONES<br># Zone statement for forward DNS lookups<br>zone "<a href="http://example.com/" target="_blank">example.com</a>" IN {<br>    type master;<br>    file "/etc/bind/master/example.com.dns";<br>    allow-update { any; };<br>};<br>zone "<span style="background-color:rgb(243,243,243)">10.10.in-addr.arpa"</span>  IN  {<br>    type master;<br>    file "/etc/bind/master/10.10.in-addr.arpa.dns";<br>    allow-update { any; };<br>};<br><br>###################################################<br>The batch.txt file I use to run nsupdate<br>###################################################<br>server 127.0.0.1<br>zone <a href="http://example.com/" target="_blank">example.com</a><br>update add <a href="http://test.example.com/" target="_blank">test.example.com</a> 86400 IN A 10.10.156.37<br>send<br>server 127.0.0.1<br>zone 10.10.in-addr.arpa.<br>update add 37.156.10.10.in-addr.arpa. 86400 IN PTR <a href="http://test.example.com/" target="_blank">test.example.com</a><br>send<br>server 127.0.0.1<br>zone <a href="http://example.com/" target="_blank">example.com</a><br>update add <a href="http://test1.example.com/" target="_blank">test1.example.com</a> 86400 IN A 10.10.156.38<br>send<br>server 127.0.0.1<br>zone 10.10.in-addr.arpa.<br>update add 38.156.10.10.in-addr.arpa. 86400 IN PTR <a href="http://test1.example.com/" target="_blank">test1.example.com</a><br>send<br><br>######################################################<br>nsupdate debug output<br>######################################################<br>greg@hp-linux:/etc/bind/master$ nsupdate -D -v batch1.txt<br>setup_system()<br>reset_system()<br>user_interaction()<br>do_next_command()<br>do_next_command()<br>do_next_command()<br>evaluate_update()<br>update_addordelete()<br>do_next_command()<br>start_update()<br>send_update()<br>Sending update to 127.0.0.1#53<br>show_message()<br>Outgoing update query:<br>;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  15755<br>;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 1, ADDITIONAL: 0<br>;; ZONE SECTION:<br>;<a href="http://example.com/" target="_blank">example.com</a>. IN SOA<br><br>;; UPDATE SECTION:<br><a href="http://test.example.com/" target="_blank">test.example.com</a>. 86400 IN A 10.10.156.37<br><br>update_completed()<br>show_message()<br><br>Reply from update query:<br>;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  15755<br>;; flags: qr; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0<br>;; ZONE SECTION:<br>;<a href="http://example.com/" target="_blank">example.com</a>. IN SOA<br><br>done_update()<br>reset_system()<br>user_interaction()<br>do_next_command()<br>do_next_command()<br>do_next_command()<br>evaluate_update()<br>update_addordelete()<br>do_next_command()<br>start_update()<br>send_update()<br>Sending update to 127.0.0.1#53<br>show_message()<br>Outgoing update query:<br>;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  38067<br>;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 1, ADDITIONAL: 0<br>;; ZONE SECTION:<br>;10.10.in-addr.arpa. IN SOA<br><br>;; UPDATE SECTION:<br>37.156.10.10.in-addr.arpa. 86400 IN PTR <a href="http://test.example.com/" target="_blank">test.example.com</a>.<br><br>update_completed()<br>show_message()<br><br>Reply from update query:<br>;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  38067<br>;; flags: qr; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0<br>;; ZONE SECTION:<br>;10.10.in-addr.arpa. IN SOA<br><br>done_update()<br>reset_system()<br>user_interaction()<br>do_next_command()<br>do_next_command()<br>do_next_command()<br>evaluate_update()<br>update_addordelete()<br>do_next_command()<br>start_update()<br>send_update()<br>Sending update to 127.0.0.1#53<br>show_message()<br>Outgoing update query:<br>;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  22045<br>;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 1, ADDITIONAL: 0<br>;; ZONE SECTION:<br>;<a href="http://example.com/" target="_blank">example.com</a>. IN SOA<br><br>;; UPDATE SECTION:<br><a href="http://test1.example.com/" target="_blank">test1.example.com</a>. 86400 IN A 10.10.156.38<br><br>update_completed()<br>show_message()<br><br>Reply from update query:<br>;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  22045<br>;; flags: qr; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0<br>;; ZONE SECTION:<br>;<a href="http://example.com/" target="_blank">example.com</a>. IN SOA<br><br>done_update()<br>reset_system()<br>user_interaction()<br>do_next_command()<br>do_next_command()<br>do_next_command()<br>evaluate_update()<br>update_addordelete()<br>do_next_command()<br>start_update()<br>send_update()<br>Sending update to 127.0.0.1#53<br>show_message()<br>Outgoing update query:<br>;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:   7571<br>;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 1, ADDITIONAL: 0<br>;; ZONE SECTION:<br>;10.10.in-addr.arpa. IN SOA<br><br>;; UPDATE SECTION:<br>38.156.10.10.in-addr.arpa. 86400 IN PTR <a href="http://test1.example.com/" target="_blank">test1.example.com</a>.<br><br>update_completed()<br>show_message()<br><br>Reply from update query:<br>;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:   7571<br>;; flags: qr; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0<br>;; ZONE SECTION:<br>;10.10.in-addr.arpa. IN SOA<br><br>done_update()<br>reset_system()<br>user_interaction()<br>cleanup()<br>Shutting down task manager<br>shutdown_program()<br>Shutting down request manager<br>Destroy DST lib<br>Destroying request manager<br>Freeing the dispatchers<br>Shutting down dispatch manager<br>Destroying event<br>Shutting down socket manager<br>Shutting down timer manager<br>Removing log context<br>Destroying memory context<br>greg@hp-linux:/etc/bind/master$ systemctl restart named.service<br><br>######################################################<br>Forward zone file after the nsupdate<br>######################################################<br>greg@hp-linux:/etc/bind/master$ cat example.com.dns<br>$ORIGIN .<br>$TTL 3600 ; 1 hour<br><a href="http://example.com/" target="_blank">example.com</a> IN SOA <a href="http://ns1.example.com/" target="_blank">ns1.example.com</a>. admin\.<a href="http://example.com/" target="_blank">example.com</a>. (<br>2          ; serial<br>900        ; refresh (15 minutes)<br>600        ; retry (10 minutes)<br>1209600    ; expire (2 weeks)<br>3600       ; minimum (1 hour)<br>)<br>NS <a href="http://ns1.example.com/" target="_blank">ns1.example.com</a>.<br>$ORIGIN <a href="http://example.com/" target="_blank">example.com</a>.<br>ns1 A 192.168.0.15<br>$TTL 86400 ; 1 day<br>test A 10.10.156.37<br>test1 A 10.10.156.38<br><br>########################################################<br>Reverse zone file after the update<br>########################################################<br>greg@hp-linux:/etc/bind/master$ cat 10.10.in-addr.arpa.dns<br>$ORIGIN .<br>$TTL 3600 ; 1 hour<br>10.10.in-addr.arpa IN SOA <a href="http://ns1.example.com/" target="_blank">ns1.example.com</a>. admin\.<a href="http://example.com/" target="_blank">example.com</a>. (<br>2          ; serial<br>3600       ; refresh (1 hour)<br>600        ; retry (10 minutes)<br>1209600    ; expire (2 weeks)<br>3600       ; minimum (1 hour)<br>)<br>NS <a href="http://ns1.example.com/" target="_blank">ns1.example.com</a>.<br>$ORIGIN 156.10.10.in-addr.arpa.<br>$TTL 86400 ; 1 day<br>37 PTR <a href="http://test.example.com/" target="_blank">test.example.com</a>.<br>38 PTR <a href="http://test1.example.com/" target="_blank">test1.example.com</a>.<div class="gmail-yj6qo"></div><div class="gmail-adL"><br></div><div class="gmail-adL">If any additional info is required please let me know and I will send it asap.</div><div class="gmail-adL"><br></div><div class="gmail-adL">Look for to your response.</div><div class="gmail-adL"><br></div><div class="gmail-adL">Rgds,</div><div class="gmail-adL">Greg Donohoe.</div></div>