Main Content

How To Install DDclient On Ubuntu

DDNS is the answer for those networking devices that have no access to a static IP address and a common need for residential users. In this post I have a Linux server at home and need to have remote access to it from any location.

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

Install DDclient.

sudo apt-get install ddclient

Installation wizard

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
#
# /etc/ddclient.conf

daemon=300
pid=/var/run/ddclient.pid
ssl=yes
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
login=username
password=password
protocol=dyndns2
server=members.dyndns.org
hostname.dyndns.org

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
#
# /etc/default/ddclient
# 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
run_ipup=”false”

# 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.
daemon_interval=”300″

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.

dpkg-reconfigure ddclient

Don’t forget to allow port forwarding on your router otherwise all attempts will fail. Flashed routers like the Linksys WRT54GL with Tomato firmware allow for a wide range of options when it come to choosing a DDNS provider from the web interface. This means centralisation and easy configuration.

Comments

  1. Commented on
    Comment by Macklaud

    Many thanks for the valuable information.

  2. Commented on
    Comment by Mat

    THANKS!

  3. Commented on
    Comment by joe

    II have tried everything, but I use it for freedns.afraid.org & its says that its running but the IP on afraid hasn’t changed. in 30 minutes.

    1. Commented on
      Comment by Luis Ventura

      I am sorry but I have no experience with afraid.org, if I have the time I’ll test on a VM to see if I come across the same behaviour.

  4. Commented on
    Comment by Derek (aka ammofreak)

    Thanks for info & Merry Xmas

    1. Commented on
      Comment by Luis Ventura

      And Merry Xmas to you 🙂

  5. Commented on
    Comment by WebWolf

    This worked great, I had no clue about the daemon mode, really fixed my problem!

  6. Commented on

    […] OpenDNS updater […]

  7. Commented on
    Comment by Max

    Please help me for my problem:

    What does ddclient when i get a new ip address at 14:05 and my ddclient interval ends at 14:07.

    Can i reach my pc from 14:05-14:07 because on dyndns there is my old ip address ??

    After 14:07 there is my new ip address on dyndns.org

    Please let me know what is about this time time frame??

    My ddclient runs in deamon mode with 600 seconds interval.

    Best Regards Max

  8. Commented on
    Comment by Garrett

    Go into the configuration file for ddclient and change the interval from 600 seconds to something lower like 60 seconds. This will check, and therefore update, your ip address sooner.

    Hope it helps!

Comments are closed.