Tags
ddclient, dyn.com, dynamic DNS, dynamic IP, DynDNS, dyndns.com, free dyndns, ios, IP-address, iPad, iPhone, namecheap.com, no-ip.com, noip.com, Raspberry PI, remote access, Remoter, setup, VNC
In Part 1 of this two-part post I explained how DynDNS can help you to access your computer at home from all over the world.
This time I’ll get down to the nitty-gritty – I will show how to setup ddclient (a tool to keep your DynDNS-records up to date).
ddclient is written in Perl and should run on any Unix-based system (like Linux or Mac OS). I installed it on my Raspberry Pi:
apt-get install ddclient
(this should work on all debian-based systems)
After the install ddclient has to be set up. For this it is good to have a basic understanding of how ddclient will keep your DynDNS updated:
– By default ddclient will run every five minutes. So if your IP-address changes the DynDNS-host name will not be updated “on-the-fly”, but with the next run of ddclient.
– Initially ddclient will have to determine the IP-address to announce
– Subsequently ddclient will contact a Server of the DynDNS-provider to transfer the address
The challenge with the initial step is that the machine ddclient is running on may not know the IP-address of your Internet-connection (this is the case if you have a NAT-router). It only knows its local (LAN) IP-address and the gateway (router) to use for Internet-access. To solve this problem ddclient can call an external resource (like checkip.dyndns.org) to request the current IP-address of the Internet-connection.
Now that we’ve got the basics let’s start the configuration. For this we will need the credentials of our DynDNS-provider. I use Namecheap.com since they offer a free DynDNS-service for their clients (as I wrote before). The required information can be found on the “Manage Domains / Enable Dynamic DNS”-page (like explained here).
All settings will be done in “/etc/ddclient.conf”:
protocol=namecheap
use=web, web=checkip.dyndns.com/, web-skip='IP Adress'
server=dynamicdns.park-your-domain.com
login=yourdomain.com
password=1b9aafgfgjh1865e024fabb629dbd1d9c462
@
protocol: Different DynDNS-providers use different protocols. For Namecheap.com use “namecheap”
use: Source to get the current IP from. Here we use “web”, but could also be an other value (see here for a list)
server: The server to report the current IP to (the provider will tell)
login: Login-name (generally your domain)
password: It’s all in the name (the provider will tell)
(last line): Host to be updated (@ is for the “naked” domain (yourdomain.com))
After changes to the configuration-file you should run a restart of the ddclient-service:
service ddclient restart
That’s it! If you have any problems try a
ddclient -daemon=0 -debug -verbose –noquiet
Enjoy!