How to Link a Domain Name to a Dynamic IP - Let’s Do It!
(Page 3 of 4 )
The time has come for us to present solutions. We will focus on reliability and price. In short, we want free but reliable Dynamic DNS service. And that’s when DynDNS enters the picture. The company was formed in 1998 and they provide top-notch leading-edge DNS services. Particularly, the DDNS function is free of charge and that’s the way it has been since the beginning (ten entire years!).
As always the first thing to do is look up their site to find the official documentation for setting up a free DDNS service. Here is the official “Creating your first Dynamic DNS host” how-to article. Even though we’ll do our best to explain the basic steps in this article too, more references to guides are always better than none!
First, we need to register for a free account. We’re asked for our username, password, e-mail address, and accept the Terms of Service (ToS). You need to realize that one of the requirements of the free account is that you are limited to having only one account. Having more will result in deletion of your accounts due to ToS violation.
Right after registering you should receive a confirmation e-mail. The confirmation is followed by step two: visit this page and log in to your account. That’s the place where you need to configure your DynDNS host service settings. Follow the instructions carefully.
Covering each small step in detail is beyond the scope of this article. We’ll focus on the most necessary requirements. In the Hostname field you need to specify the subdomain and then pick the hostname you would like from the list. At the IP address you specify the current IP address of the server, but this one will change later on using the ddclient. The auto-detected Remote IP finds out your current remote IP; click on that button.
Tick the box “Enable wildcard” if you want to redirect all kinds of subdomain tries to the main subdomain (johndoe.yoursubdomain.hostname.com would automatically redirect to yourdomain.hostname.com). You should also tick the box “Mail Exchanger” if you run an MX server, and if you want to use it as a secondary MX then also enable the “Backup MX” option. By the way, MX stands for Mail eXchanger in case you didn’t know.
If you don’t have any additional MX servers, then just type in the selected subdomain (e.g.; yoursubdomain.hostname.com). Furthermore, you may want to also use the WebHop feature. WebHops allows you to redirect complicated and long hostnames to short and easy-to-remember hostnames (acting as a forwarder). Specifying the TTL isn’t optional at all. Keep in mind the following rule of thumb:
Low TTL amounts should be used only in case of dynamically assigned IP addresses via a DHCP. Low caching time is required to update the changes as soon as possible. High TTL amounts should be used without concern with static IPs because it reduces (or eliminates) the additional time visitors spend waiting for DNS resolutions (when the browser “does nothing” for a second.)
By now you should have configured your DynDNS host service. Now you just need to download a DynDNS update client. You can download one from this link. They have few variations for all platforms (Windows, Mac/OS X, and Linux/Unix). The Windows and Mac ones sport a really intuitive and straightforward graphical user interface. Working with them is child’s play. Installation is also easy, and they run as services.
These clients also support a forced “monthly” update to prevent the DynDNS account from expiring (it’s specified within the Terms of Services that you need to use your account at least once a month). This is useful if, for whatever reason, your IP doesn’t change for more than a month because you might risk losing your account.

(Image Courtesy of DynDNS)
One of the most common problems that users face when using DynDNS host services is that, when everything is set up and seemingly works fine for external users (visitors), they themselves cannot access the server/site locally. This is the popular loopback connection error where your router becomes confused and instead of redirecting to port 80 service (HTTP), it thinks that you want to access the router’s configuration.
This isn’t a big deal because it doesn’t hinder external visitors, but you can fix it anyway by disabling an option, something along the lines of “Filter Internet NAT redirection,” but it depends on what kind of router you own (model, manufacturer, etc.). Other issues might be related to firewall and even port forwarding. You should not forget about all of these “local” network fixes. You need to configure those too.
Now since we are done with this, let’s also present the ddclient, which is the Linux alternate DDNS update client. It is a small and powerful Perl script that acts as a daemon and operates the automatic (but also manual) updates to the DNS server. Installing and setting up ddclient is pretty easy for somebody that’s familiar with *nix operating systems. However, checking out the official documentation is a good start.
As you can see from the manual, after you’ve downloaded and extracted the latest release version from Sourceforge (yes, it’s an open-source tool), all you need to do is modify the sample configuration file. However, the DynDNS’ manual also features a template that you should just edit and use it right away.
If you are using PPP (Point-to-Point Protocol) to connect to your ISP such as PPPoE (Point-to-Point Protocol over Ethernet) with fiber optic Internet connections, then you can configure ddclient to update right after each connection. This can be done by doing something along the lines of the following (and depends on factors like *nix distro, etc.).
cp sample-etc_ppp_ip-up.local /etc/ppp/ip-up.local
chmod +x /etc/ppp/ip-up.local
mkdir /var/cache/ddclient
touch /var/cache/ddclient/ddclient.cache
chmod 600 /var/cache/ddclient/ddclient.cache
Touch is used to update the timestamps, access, and other modification times for the files. Chmodding is required to update the permissions: +x grants everyone full execution permissions, while 600 sets read permissions but only for the owner; cp stands for copying while mkdir creates a new directory.
Here’s another example for the configuration file. Use this when you want to use the status page of the router as a reference from which to pick up IP changes:
# Basic configuration file for ddclient
#
# /etc/ddclient.conf
daemon=60
cache=/tmp/ddclient.cache
pid=/var/run/ddclient.pid
use=linksys, fw=linksys, fw-login=admin, fw-password=admin
login=your-username
password=your-password
protocol=dyndns2
server=members.dyndns.org
custom=yes, example.com
The lowest amount of sleep time that’s possible for the daemon is 60 seconds. Finally, I’d like to point out that DynDNS also features a web-based configuration file generator so if you are facing some issues then you should definitely try it out: link.
Next: Closure >>
More Web Hosting How-Tos Articles
More By Barzan 'Tony' Antal