Untangling the dns hell

Tag: Code


The site has been offline a few days now due to my dear friend Joel’s flaky connection.
He’s on a 10mbit host provided through a web-login which for some reason kept logging him out every now and then..

The simple solution was to add an auto-login script to the crontab; luckily this guy had already written a script for Joel’s provider.

But a new problem appeared, sometimes the server received a new IPaddress from the provider and that sure caused quite alot of trouble.
We’re having 4 different domains pointing to this address including their sub-domains and keeping all those in sync would become a manual labour since neither one.com or loopia.se provides commandline tools to update their entries (In a sense that is unnessecary since usually it’s simply the wrong approach).

So this is how it’s solved!

First register a free hostname at www.no-ip.org , in our case I registered warcamp.no-ip.org

Then install and configure their auto-update client. If you’re on debian/ubuntu you can simply type: sudo apt-get install noip2

Once you have one dns synced with your server you can then simply point all other domains to that address using an CNAME entry; in my case pointing to warcamp.no-ip.org

Notice:
Due to specification limitations you cannot use a CNAME entry for your root domain (e.g.  .tonyivanov.se). A simple workaround is to create an CNAME record for www.yourdomain.com and then modify the root record to web-hop to www.yourdomain.com

Voilá! You have an automatic dns synchronization!

Comment
6356b6292fe1c023e54dff1100f0949f?size=48&d=mm Joel
Wow. Good work! :D Hope this ancient laptop under my sofa delivers then. haha