DDNS is the answer for those networking devices that have noaccess to a static IP, a common need forresidential users. Basically the target system needs to run a client that talks to a master DNS server,from which after authenticating will be forwarded all request coming from the Internet.
In this post I have a Linux server at home and need to have remote access from any location. I will be using DynDNS and DDclient to communicate with the service provider.
First install the required SSH and SSL socket
Self explanatory we want to be able to send the account password via a secure connection.
sudo apt-get install ssh libio-socket-ssl-perl
sudo apt-get install ddclient
Select the DDNS provider
Provide the assigned qualified domain name
Provide your username
Provide your password
And the interface
The configuration file is located at /etc/ddclient.conf. Edit your configuration to make use of the secure configuration.
sudo nano /etc/ddclient.conf
# Configuration file for ddclient generated by debconf
use=web, web=checkip.dyndns.com/, web-skip=’IP Address‘
Now make sure DDclient is set to work as a daemon. You need to change run_daemon=”false” to run_daemon=”true”.
sudo nano /etc/default/ddclient
# Configuration for ddclient scripts
# generated from debconf on Tue Dec 9 19:52:12 EST 2008
# Set to “true” if ddclient should be run every time a
# new ppp connection is established. This might be useful,
# if you are using dial-on-demand
# Set to “true” if ddclient should run in daemon mode run_daemon=”true”
# Set the time interval between the updates of the dynamic DNS name in seconds.
# This option only takes effect if the ddclient runs in daemon mode.
Now verify DDclient is working by rebooting first and issuing the following two commands.
sudo /etc/init.d/ddclient restart
sudo /etc/init.d/ddclient status
If the client is working correctly you should see the same output. Status of Dynamic DNS service update utility: ddclient is running In case you want to reconfigure the client issue the following command.
Don’t forget to allow port forwarding on your router otherwise all attempts will fail. Flased routers like the WRT54GL with Tomato firmware allow for a wide range of options when it come to DDNS provider from a simple web interface. This means centralisation and easy configuration