Jethro's Braindump

Setting up Dynamic DNS on Raspberry Pi

We want to expose the device to the external web, but our external IP address is always changing (depending on your ISP).

The solution is dynamic DNS: where we have a domain name resolve to the ever-changing IP address. We may use a service like FreeDNS.

First, setup an account at the linked website, and register a subdomain. Next, we can simply install a FreeDNS client on the device:

sudo apt install ddclient

This will walk you through the steps for setting ddclient. The following example config is provided by the website:

syslog=no # log update msgs to syslog
#mail=root # mail all msgs to root
#mail-failure=root # mail failed update msgs to root
pid=/var/run/ # record PID in file.
ssl=yes # use ssl-support. Works with
# ssl-library

use=if, if=eth0
protocol=freedns                # or dyndns1 if facing difficulty

Links to this note