Operating System - HP-UX
1819941 Members
3385 Online
109607 Solutions
New Discussion юеВ

How to use nsupdate to add NS record for reverse zone.

 
Geoff Wild
Honored Contributor

How to use nsupdate to add NS record for reverse zone.

What I want to do.

Currently, in my bind 9.2.3, my reverse zone has 2 dns servers in SOA:

$ more 192.168.zone
$ORIGIN .
$TTL 14400 ; 4 hours
168.192.in-addr.arpa IN SOA dns1.mydomain.com. dnsguy.mydomain.com.168.192.in-addr.arpa. (
652395 ; serial
1800 ; refresh (30 minutes)
300 ; retry (5 minutes)
3600000 ; expire (5 weeks 6 days 16 hours)
604800 ; minimum (1 week)
)
$TTL 0 ; 0 seconds
NS dns2.mydomain.com.
NS dns1.mydomain.com.
$ORIGIN 1.168.192.in-addr.arpa.


I want to add a third - I know this is easy manually - rndc stop, edit zone file, add

NS dns3.mydomain.com.

update serial, restart named.

I use dynamic dns, so, how can I accomplish the above with nsupdate?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
2 REPLIES 2
Geoff Wild
Honored Contributor

Re: How to use nsupdate to add NS record for reverse zone.

Here's what I'm trying so far:

$ nsupdate
> zone 168.192.in-addr.arpa
> update add dns3.mydomain.com 0 IN NS
>

Doesn't seem to work....


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: How to use nsupdate to add NS record for reverse zone.

Sorry - no bunny for anyone :(

Answer is:

$ nsupdate
> zone 168.192.in-addr.arpa
> update add 168.192.in-addr.arpa 0 IN NS dns3.mydomain.com.
> send
>
> quit


check_soa 168.192.in-addr.arpa
dns1.mydomain.com has serial number 652396
dns2.mydomain.com has serial number 652396
dns3.mydomain.com has serial number 652396


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.