Raspberry Pi as DynDNS Client (with SSL)

Many users have their Raspberry Pi attached to their router at home and want to use it as a server, but many ISPs change your IP adress periodically. So would be great to have a domain name that is always dynamically linked to your current IP and updates automatically.

All you need for this is an account at DynDNS.org (or a similar service) and ddclient on your Raspberry Pi. Unfortunately DynDNS seems to not provide any new free accounts.

Since I’m also concerned about security a little bit we’ll have ddclient use SSL to encrypt the update requests. It’s really a no-brainer to set up, so why not?


Just type in the following commands to get started:

sudo apt-get update
sudo apt-get install libio-socket-ssl-perl
sudo apt-get install ddclient

The first install will get us the necessary SSL libraries and the second one the actual ddclient. During the installation a configuration assistant will guide you through the necessary basic steps. Hint: use Space to confirm your selections. After that is done open up /etc/ddclient.conf in an editor and change it to look like this:

# Configuration file for ddclient generated by debconf
# /etc/ddclient.conf

#update every x seconds
# write log to /var/log/syslog
# use SSL encryption for update requests

use=web, web=checkip.dyndns.com, web-skip='IP Address'
password='<password>' # password in quotes

This will update your IP every 10 minutes, write messages to the syslog, use encryption and update the two specified domain names. For more options check out this DynDns page and the ddclient usage page.

Tagged , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s