Three Steps to a Free Domain for your Home Network

Mon, Mar 2, 2009

Tweet this!

If you have services running inside your home network, like a web server or file server, or you want to be able to access your home network while away (for example, over SSH), it’s useful to have a domain name so you don’t have to remember your home IP address. This guide will show you how, for free, to get your own domain name, and keep it active even if you have a dynamically allocated IP address.

Step 1. Get a DynDNS account.

The first thing you’re going to have to do is get an account at DynDNS. I’ve been using DynDNS for years because they’re incredibly reliable, the service is fast, and most importantly, it’s free. They have a huge list of domain names to choose from, so you can pick something easy for you to remember.

Setting up an account is easy; there’s the standard stuff, like picking your user name and password, and then you select your domain name, and it will automatically associate it with your IP address.

Step 2. Installing ddclient
This step is critical, because it will keep your DynDNS account active, and it will keep your domain name associated with your IP address even when your ISP changes your IP (assuming you aren’t lucky enough to have a static IP address). In debian-based distributions, such as Ubuntu, install ddclient with the command:

sudo apt-get install ddclient

This will install ddclient, and now all that there’s left to do is configure it…

Step 3. How to Configure ddclient
Now that ddclient is installed, you need to set it up to work with your DynDNS account and your router (so it can find your outside IP address). The configuration file is located at /etc/ddclient.conf, and you’ll need to be root to modify it (or even read it, since it contains a plain-text password). Run the command:

gksudo gedit /etc/ddclient.conf

And your text editor will open the configuration file, which will contain these lines:

use=if, if=eth0
login=[your login]
password='[your password]'
[your domain name]

We’re interested in the use line, which you should set to your router type. To find the correct configuration, run:

ddclient –help | grep -i [your router brand]

For example, I run:

ddclient –help | grep -i netgear

and find that the appropriate “use” line for my router model is netgear-rp614. So, in my /etc/ddclient.conf, I change the use line to:


Finally, we need to add a line to let ddclient know where our router is located. On my network, the router’s address is, so I add the line:


Where “fw” stands for “firewall.” That’s it! Save your ddclient.conf file, and run:

sudo /etc/init.d/ddclient restart

which will restart ddclient with the new configuration.

That’s it! Now your home network will be accessable through whatever domain name you chose, and you can access your file server, web server, or any other services from anywhere, over the internet; all without having to remember your IP address!

Like this post?

6 Responses to “Three Steps to a Free Domain for your Home Network”

  1. GriFF3n says:

    Nice howto Jonathan. How secure is this for the home network? Want to try this on my home server, just worried about security.

    • Hi Griffen, thanks for posting a comment.

      This does not really have any security implications; all it is doing is pointing a DNS entry to your IP address. If you previously had security vulnerabilities at your IP, now they will also be available through that domain name.

      The only real implication I can think of is that while you previously may have had a dynamic IP address, which would mean that every time your IP changed, an attacker would have to go through the work of finding you all over again, here you have a domain name that will always point to you.

      So the convenience works both ways. But that being said, I don’t think this poses any added security risk, assuming you are already taking basic security precautions (firewall, etc).

  2. kindofabuzz says:

    If you have a Linksys router you don’t need ddclient, it’s built into Linksys firmware.

    • HeinerVG says:


      That depends of the Linksys router model, because not all of them complains with the GPL license or will have a *nix based OS installed on them :)

  3. John D says:

    Tomato Router Firmware keeps this up to date for me

  4. What company is the best Domain Registrar? i’ve heard that Godaddy and Moniker are the best.~”*

Leave a Reply

Weekly Poll

What's the best Linux distribution for desktops?

View Results

Loading ... Loading ...

Related Posts

Search TechThrob