DDNS

DigitalOcean DDNS

Years ago, when I first bought nitkin.net, I thought it'd be pretty neat to give my home server a domain, say, home.nitkin.net. At the time, IMeanWebHosting handled DNS through CPanel. CPanel doesn't have an API to update DNS records, so DDNS was a long shot. Instead, I wrote up a little script that'd simply track my home's IP address, and figured I could update the records by hand when things changed. (As it turns out, RCN never changed our IP in the 2 years that home.nitkin.net was up for, so the whole DDNS thing was entirely unnecessary. (That's all back here, along with some introductory material.)

But times change, people move, and shared servers are outgrown. I graduated from school and moved out to Colorado (anyone want to hire an electrical engineer who's pretty good at website stuff and Linux?), and switched hosting providers.

Custom DDNS

A few years ago, I set up a home server. It runs a few services - mostly MythTV and an FTP server. When I first set it up, I gave it DDNS through DynamicDNS (it was heartofgold.dyndns.com). I became fed up with their policies fairly quickly - especially their expiration rules, and replaced them with afraid.org DNS.

Afraid.org offered free DNS, but the service also has an expiration. I missed a deadline, and my lovely domain (bam.boozle.co) went dark. But now, I have my very own address: nitkin.net, and all of its derivatives. I've wanted to give the home server the address home.nitkin.net for a while, and now I have time to fiddle.

Every computer on the internet has an IP address which identifies it uniquely. But you browse using names, which aren't directly linked to machines. Essentially, when you type an address into the URL bar, various servers recursively evaluate it, looking for an IP address to connect to. For my URL, home.nitkin.net., the request is first passed to a root server. That server looks at the net portion of the URL, and forwards the request for home.nitkin. to the root net server. That server resolves nitkin to a machine owned by IMeanWebHosting, and asks that server to resolve the last part of the URL: home. home resolves to the IP address of my home server, which is returned to you.

(In reality, there's tons of caching going on. As likely as not, searches like en.google.com are common enough that the first server you ask has the IP saved.)

To assign the name, I just needed to add an A (address) record to the nitkin.net nameserver. Adding the record is trivial. Keeping it up to date is harder.