DDNS Client Software: Linux DDclient
One of the most commonly used clients is DDclient, which can overcome the NAT limitations of DDNS by actually logging into your SOHO firewall to determine the latest IP address information. Like most Red Hat and Fedora Linux software products, DDclient is available in the RPM format. (If you need a refresher on RPMs, consult Chapter 6, "Installing RPM Software.") You can usually download the software from your DDNS provider, or you can find it at rpmfind.net. The RPM name usually starts with ddclient followed by a version number, as in ddclient-3.6.3-1.noarch.rpm.
The /etc/ddclient.conf File
The ddclient.conf file is usually installed completely commented out, but provides many configuration examples for the most popular DDNS providers.
The most important general parameters to configure are:
Username: Your DDNS account's login name Password: Your DDNS account's password Use: The method used to determine the IP address to advertise to the DDNS server
Some important DDNS provider parameters are:
Server: The name of the DDNS provider's main DNS server Protocol: The methodology the DDNS client should use to communicate with the DDNS server Your domain: The domain to which your Web server will belong
You can use the ddclient command to determine the best use parameter to use in the ddclient.conf file. In this example, only the use=web option gives a valid Internet IP address and should be considered as a first option:
[root@bigboy tmp]# ddclient -daemon=0 -query
use=if, if=lo address is 127.0.0.1
use=if, if=wlan0 address is 192.168.1.100
use=web, web=dyndns address is 97.158.253.26
[root@bigboy tmp]#
Take a look at a sample configuration. This example specifies a username of my-account-login-name and a password of my-account-password using the dyndns DDNS service provider's settings to track the Web site named mysite-example.dnsalias.com.
# General Parameter Section
login=my-account-login-name
password=my-account-password
# DDNS Provider Parameters Section
server=members.dyndns.org, \
protocol=dyndns2 \
mysite-example.dnsalias.com
You can add one of the following use lines to the General Parameter Section near the top of the file to define the method that will be used to determine the correct IP address:
Query a well-known Internet server: The Web method queries two well known servers run by DynDNS.org and DNSpark to determine the public Internet IP address of the Web server running the DDclient software. This method is the simplest as it requires no further information and handles NAT correctly.
use=web
Use the IP address of a specific server NIC: You can also query the IP address of the DDclient Web server's NIC interface of your choice. This is probably most valuable for servers connected directly to the Internet, and not via NAT.
use=if, if=eth0
Login to your SOHO firewall for information: The ddclient.conf file has a list of use statements for various vendor's firewalls. If your model isn't listed, you can create your own parameters as outlined in the DDclient read-me file. This option is good for NAT environments where the use=web option isn't considered a good alternative.
After editing your configuration file, you'll have to start ddclient as shown in the next section.
How to Get DDclient Started
You can configure DDclient to start at boot time using the chkconfig command:
[root@bigboy tmp]# chkconfig ddclient on
You can start, stop, and restart DDclient after boot time using the DDclient initialization script, as in:
[root@bigboy tmp]# service ddclient start
[root@bigboy tmp]# service ddclient stop
[root@bigboy tmp]# service ddclient restart
Remember to restart the DDclient process every time you make a change to the ddclient.conf file for the changes to take effect on the running process.
You can test whether the DDclient process is running with the pgrep command; you should get a response of plain old process ID numbers:
[root@bigboy tmp]# pgrep ddclient
Finding DDclient Help
The DDclient read-me and ddclient.conf files are good sources of information for doing custom configurations and troubleshooting. You can find the read-me file by using DDclient RPMs or the locate command.
Use the rpm command to get a list of installed DDclient files, one of which is the read-me file:
[root@bigboy tmp]# rpm -ql ddclient
...
/usr/doc/ddclient-3.6.3/README
...
[root@bigboy tmp]#
Alternately, you can use the locate command to find all the DDclient files:
[root@bigboy tmp]# locate ddclient | grep READ
/usr/doc/ddclient-3.6.3/README
/usr/doc/ddclient-3.6.3/README.cisco
[root@bigboy tmp]#
If the command doesn't work, try updating your locate database with the locate -u command followed by the locate ddclient command once more:
[root@bigboy tmp]# locate -u
|