In my earlier posts I covered network services. The purpose of those services is to provide a function over a network connection. More often than not the internet connection of a network service host can change. In order for a client to access these network services, it needs to know where the host is. To remedy this problem, a “call home” service is used to register the host so the client can find it. This service is referred to as Dynamic DNS. In this post I’ll cover how to install and configure Dynamic DNS on a Linux host.
The first thing to do is create an account with a Dynamic DNS provider. Here is a list of providers https://doc.pfsense.org/index.php/Dynamic_DNS. Once you establish an account, you will need the following items in order to configure on your host.
- Dynamic DNS Server
- Dynamic DNS Protocol on how to communicate
- Username of the account
- Password of the account
- Network interface of host
- Fully qualified domain name of host
The service we’ll be using is call DDClient and most distributions have an installer. For mine, I ran this command.
sudo apt-get install ddclient
This will bring up a text based prompt for you enter in your Dynamic DNS service providers information. Using the information from the bulleted list above, enter in that information. Once complete the install will complete. There are some service configurations that should be made. Use a text editor run as su and edit the following files.
The service on your host should be ready. Lets use this command to verify all is working as expected.
sudo ddclient -daemon=0 -debug -verbose -noquiet
The results will echo back and the last line should read something like this.
SUCCESS: host.dynamicdns.provider: skipped: IP address was already set to xxx.xxx.xxx.xxx
That should do it. Now your host can be accessed by a client using a fully qualified domain name. If the internet connection for your host should change, it will call home and update the FQDN used by your client.