Ubuntu (Gutsy): DynDNS Client Setup

Hello again, this time we’re going to setup a DynDNS client so your computer/server can be reached from anywhere.

Step 1

First, you need to create an account with DynDNS to do so follow this howto: https://www.dyndns.com/services/dns/dyndns/howto.html.

Step 2

First we’ll install ssh and ssh-socket so we can send our DynDNS user and password encrypted instead clear text:

$ sudo apt-get install ssh libio-socket-ssl-perl

Step 3

Install ddclient:

$ sudo apt-get install ddclient

Step 4

The installation will prompt you some questions. For the first one it ask for your dynamic DNS provider, select http://www.dyndns.com:

ddclient01.png

Then, put your fully qualified domain name(s):

ddclient02.png

Now, your DynDNS requistered username and password:

dcclient03.png

ddclient04.png

And finally, type “web” as the DynDNS interface to use:

ddclient05.png

Ok, so long we’ve finished installing ddclient but there’s still more work to do in order to get it working properly.

Step 5

We, need to change the ddclient configuration file (/etc/ddclient.conf) in order to use ssh to send the username and password, and to properly check the IP adrress. From the command line open ddclient configuration:

$ sudo vim /etc/ddclient.conf

In the generated configuration file you’ll probably see something like the following (The parts in italics will be different, the bold parts are going to change so special attention on this):

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
pid=/var/run/ddclient.pid
protocol=dyndns2
use=if, if=web
server=members.dyndns.org
login=your-dyndns-username
password='your-dyndns-password'
your-host-name.homelinux.net

Step 6
We need to change the configuration so ddclient get our public IP address properly, and to send our username and password over ssh.

DynDNS has a web interface to get your public IP address, this is equivalent to manually invoking http://checkip.dyndns.com/. But we need to properly configure this interface, so change the line use=if, if=web for the following:

use=web, web=checkip.dyndns.com/, web-skip='IP Address'

Second, add to your configuration file just below the initial comments the following:

ssl=yes
daemon=300

The above two lines tells ddclient to use ssl for its connection and to update your public IP address every 5 minutes (specified in secconds).

Step 7

Now, we must make sure that ddclient is set to run as a deamon. Edit /etc/default/ddclient:

$ sudo vim /etc/default/ddclient

And make sure that:

# Configuration for ddclient scripts
# generated from debconf on Tue Jan 29 20:23:32 CST 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"

Step 8

Finally, restart your ddclient and if no error is printed you’re good to go:

sudo /etc/init.d/ddclient restart

Port Forwarding

In order to deliver services on the net, you must open the corresponding ports for the services that your computer/server will provide, this is called Port Forwarding. Unfortunately this howto does not cover that topic. To do so you can visit http://www.portforward.com/routers.htm, where you can read how to port forwarding for your specific model of modem/router.

Happy hacking!

About these ads

6 Comments

  1. Posted March 21, 2008 at 09:56 | Permalink | Reply

    thanks, it works like a charm !

  2. Posted July 22, 2008 at 11:56 | Permalink | Reply

    Thanks very much for the howto was very helpfull.

  3. mexpolk
    Posted July 22, 2008 at 15:40 | Permalink | Reply

    You’re very welcome Paul55!

  4. Posted October 2, 2008 at 21:20 | Permalink | Reply

    Thanks a lot for making this tutorial available. As other said, works like a charm. Again: thank you! :)

  5. Posted December 10, 2008 at 15:22 | Permalink | Reply

    Thanks! This is my very first day using Ubuntu and this was the first thing I needed to get installed after ssh!

    TjL

  6. Posted August 30, 2009 at 20:00 | Permalink | Reply

    took 5 minutes to get it running, great

13 Trackbacks

  1. […] Installing ddclient to update the DynDns server — followed directions at http://mexpolk.wordpress.com/2008/01/29/ubuntu-gutsy-dyndns-client-setup/ […]

  2. […] ddclient to update the DynDns server — followed directions at http://mexpolk.wordpress.com/2008/01/29/ubuntu-gutsy-dyndns-client-setup/ « […]

  3. […] If you want to be able access your files from outside the local network, Dyndns is great way to do that. You can use a application called DDClient to automatically update there servers with your new IP when it changes. more info on setting up ddclient […]

  4. By Home Network: Fine Tuning » westrealm on October 8, 2008 at 21:17

    […] bad ass when I do something somewhat complicated like that on a completely text-based OS.  Anyway, this is the tutorial I used.  I also did this entire set of instructions via SSH.  It worked […]

  5. By Schmedley Willox » Asus Eee and a File Server on November 7, 2008 at 14:06

    […] 3. Now you need to make the Apache 2 server available from the internet. Follow this tutorial. […]

  6. By Friday Favorites | Scribute on January 9, 2009 at 22:06

    […] Making that file server accessible from anywhere […]

  7. […] Ubuntu (Gutsy): DynDNS Client Setup « Ivan Torres – […]

  8. […] innen tanultam « debian package-ek listázása […]

  9. […] of it was rather painless to setup thanks to this great HOWTO on-line, however, I did run into a couple […]

  10. By Server question - Home Brew Forums on May 14, 2009 at 13:44

    […] with Apache, MySQL, and PHP. And here’s a tutorial on getting DynDNS to handle your dynamic IP: http://mexpolk.wordpress.com/2008/01…-client-setup/ __________________ ——————————————— Fermenting: Centennial Blonde, […]

  11. […] on so I decided to finally figure out how to update my Dyndns account with it. I followed the guide here and it’s working nicely. You can get a Mac widget and just search for a similar one for […]

  12. […] Hello again, this time we're going to setup a DynDNS client so your computer/server can be reached from anywhere. Step 1 First, you need to create an account with DynDNS to do so follow this howto: https://www.dyndns.com/services/dns/dyndns/howto.html. Step 2 First we'll install ssh and ssh-socket so we can send our DynDNS user and password encrypted instead clear text: $ sudo apt-get install ssh libio-socket-ssl-perl Step 3 Install ddclient: $ s … Read More […]

  13. By unable to configure filezilla ftp server on October 17, 2010 at 03:03

    […] Install dyndns-client and check if it works – http://mexpolk.wordpress.com/2008/01…-client-setup/ […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: