Skip to content

Instantly share code, notes, and snippets.

@dlangille
Created April 7, 2018 19:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlangille/b6296fabb876ef7564b1ccf1db66dee4 to your computer and use it in GitHub Desktop.
Save dlangille/b6296fabb876ef7564b1ccf1db66dee4 to your computer and use it in GitHub Desktop.
using nsupdate to change NS and update SOA
nsupdate -k pathtoprivatekey
server yourunameserver
zone langille.org
update add langille.org. 3600 IN NS ns3.unixathome.org.
update add langille.org. 3600 IN NS ns2.unixathome.org.
update add langille.org. 3600 IN NS ns1.unixathome.org.
update delete langille.org. NS old1.unixathome.org.
update delete langille.org. NS old2.unixathome.org.
update delete langille.org. NS old3.unixathome.org.
update add langille.org. 3600 SOA ns1.unixathome.org. soa.unixathome.org. 2018040700 10800 1800 1209600 86400
send
@ki9us
Copy link

ki9us commented Nov 12, 2021

When setting the SOA line, don't forget to increment the serial (2018040700 here) or the changes won't be applied.

@dlangille
Copy link
Author

@keith24 is referring to line 13 and I didn't know what was being referred to at first. I've never bumped a serial when using nsupdate I thought.

Then I realized it was line 13 which contains a serial. Yes, now I understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment