Getting into your home network from the wild west known as the internet can be a pain, especially if your IP address is always changing on you, or perhaps the one time that you need to get into your home network your IP address changed.
This happened to me not so long ago, my IP address hardly ever changes but my IP address did happen to change when I moved into my new residence. Assuming that my address would stay the same I headed off to work, unfortunately I was unable to phone home.
Many people know about the free sites that let you update your IP address such as DynDNS, no-ip.org etc. But I couldn’t settle for that mediocre domain. By setting up a CNAME in my DNS I was able to forward a subdomain to my dynamic update address which in effect allowed me to remember home.mydomainname.com rather than the wacky no-ip.org address I chose. You can do the same using free utilities, providing that you have a little time and some control over your DNS.
Before you proceed make sure you have a way of setting a CNAME for your domain name. You can try your domain registrant if you use their web servers, maybe your web host gives you the ability to manage zones and if not ask them if they can add it for you, most times they will.
You will need to set up an account with one of the free providers I used No-IP.com but others like DynDNS.org, freedns.afraid.org, ZoneEdit.com and easyDNS.com should work.
Once you have set up an account with them and have your IP address mapped to a domain name, go ahead and add the CNAME record into your DNS.
The next step is to install and configure the program, script, cron or whatever method your free DNS account uses to update. I used my DD-WRT installation and plugged my account information into the DDNS tab, I checked the update and it registered my IP.
Once you have got your IP address into the free DNS provider, you should check to make sure that it works by doing a lookup on that host name. Use nslookup to do this:
If it resolves to your home IP address, then your set to move forward with tackling the task of adding the CNAME into the DNS for your domain name. I cannot cover how to do this with every system in this article but basically you create a zone with the domain, 14400 IN CNAME and the full address of your free DNS with a period at the end. This is important or your name will not resolve properly.
Depending on what DNS servers you use it may take a while for the DNS to get updated. In nslookup I set my server to use OpenDNS’s in to test to make sure the name resolved properly. To do this, start nslookup and type:
> server 188.8.131.52
Once you perform a lookup on your new subdomain, you should see something like the following:
> home.yourdomainname.com Server: 184.108.40.206 Address: 220.127.116.11#53 Non-authoritative answer: home.yourdomainname.com canonical name = yoursubdomain.your-free-dns-account.com Name: yoursubdomain.your-free-dns-account.com Address: [your IP]
Thats all there is to it. If your IP is updating via your free DNS service and you set up your CNAME then you will be able to find your home, or give your home address to anyone wishing connect without the embarrassment or hassle of explaining your subdomain and free domain account.