Raspberry Pi – DDNS Client

Periodically, I leave a server running at home and need to reach it from the outside. You probably have the similar ISP that I have who wants a small fortune for either a static or “sticky” ip address. From having worked with various brands of network gear, I knew there had to be another way. After some initial searching, I found ddclient. The initial reading I have done indicates that it only works with one dynamic dns provider – dnsdynamic.com. When I downloaded the client and installed it, I had a list of several additional providers that it would support. Interestingly enough DDNS wasn’t listed by I was able to select “Other Providers” and was able to get it to work.

To get the process started, type sudo apt-get install ddclient. After ddclient has downloaded and installed, you will be prompted with several questions. I elected to go with “Other Provider” and entered the information when prompted. You also have the option of editing the client config file – sudo nano /etc/ddclient.conf. Here are the minimum lines that you will need to have in the file for things to work –

protocol=dyndns2
use=if, if=eth0
server=www.dnsdynamic.org
login=USERNAME (EMAIL ADDRESS)
password=’PASSWORD’
host.domain.com

You will need create an account on the ddns provider you will be using ddclient with and have your username, password, server and hostname ready. Once you have the software configured, use the sudo service ddclient restart command to get things started. If no errors displayed, you are probably ok. Using the sudo service ddclient status will show if the service is running. You can also use tail /var/log/syslog to see if things are ok. You should see something like this if everything is working.

Feb 20 23:08:49 raspberrypi ddclient[3930]: SUCCESS: updating rnutter.dnsdynamic.com: good: IP address set to 192.168.0.156

There is one limitation that I have heard about and have verified is that if your RPI is behind a firewall (either yours or your ISP), it won’t report the correct address. Hopefully I will find a way to resolve this or find another dynamic dns client that knows how to deal with this. Either way, I know this is possible with the RPi, maybe the solution (at least in the short term) is to load UFW and then I will be able to put this on an outside address.

To see more of my posts about the Raspberry Pi, please go to http://www.ronnutter.com/category/raspberry-pi/

Send to Kindle
This entry was posted in Blog Entries, Raspberry Pi and tagged . Bookmark the permalink.