My Solaris machine that ran DHCP/DNS and Routing for my home network died tonight after having been running for over 3 and a half years no-stop. So I had to re-setup my dhcp and dns on another machine, luckly I had backed up the stuff that was on the old machine a month or so ago, but some info had changed. In particular was the Dynamic DNS that I had setup and linked with the DHCP server (I use ISC’s DHCP and DNS). So I got the backup restored on another server and everything running, but a couple of hosts would not work. Come to find out the backup I had was several months old (no problem the machine did not change that much), but what did change was my IP address to the world (It changed some time in march or april after having been the same for over 3 years).
Well I had forgot how to update the Dynamic DNS stuff so I had to go hunting. This is what I did:
1. You can update the info dynamicly using nsupdate (if you have it configured to do so, which I did). So I did the following:
#nsupdate server 10.0.0.69 key dhcpupdate u23ove098uy2ok3n12339== zone homenetwork.net update delete homenetwork.net send update add homenetwork.net 18000 IN A 10.0.0.1 send ^D
So now that part worked, but I noticed that I screwed up one of the NS records (it had the ip with the domain) at some point. So again to delete and add a new NS record:
#nsupdate server 10.0.0.69 key dhcpupdate u23ove098uy2ok3n12339== update delete homenetwork.net. NS 10.0.0.69.homenetwork.net. send update add homenetwork.net. 86400 IN NS ns.homenetwork.net. send ^D
So that is all fine and well, but I am used to editing the files by hand… Didn’t realize until tonight that I could actually still do that. Any one who has used DDNS from ISC will notice that in the zones directory there will be files with a .jnl attached to it for the zones that are dynamic dns enabled. Those files are binary so viewing them looks very weird. I always thought for some reason that those were “it”, and the files that I used to use were no longer used. But they are….. The old files are updated about every 15 minutes with the info that is in the jnl files. But if you want to edit the files likeĀ you always have, but still use ddns, you can. All you need to do is “freeze” updates, edit the files and then “thaw” the zones. When you freeze the zone it will flush the info in the jnl files to the files you are used to editing. All you need to do is the following:
rndc freeze
Edit the files
rndc thaw
Your changes will now be available.