Setting up ddclient on Ubuntu

, No Comments »

ddclient is a program that sends a request to a dynamic DNS provider to update your DNS entry.

Before you start using ddclient you need to be registered on a supported dynamic DNS provider, check the ddclient website to find a list of providers available. ZoneEdit was my choice because it provides the service for free for up to 5 domain names.

Installing ddclient for Ubuntu

From the command line:

$ sudo apt-get install ddclient

Configuring ddclient

There are two configuration files for ddclient in Ubuntu:

  • /etc/default/ddclient contains some of the default settings
  • /etc/ddclient.conf an almost empty file for you to entered your configurations

Retrieving Your WAN IP Address

ddclient provides many options of where you can retrieve your WAN IP address from e.g. network card, command line, router/firewall, etc. Visiting the ddclient website under “supported routers” will list out all the options which you can use. I decided to use the fw option and obtain my IP address from my router by specifying the location of my router’s status page. In the /etc/ddclient.conf

use=fw
fw=<router's ip address>/<status page uri>
fw-login=<router's admin username>
fw-password=<router's password>

Communicating with Dynamic DNS Provider

ddclient provides support for a many of the most popular dynamic DNS providers. A list of supported providers can be found in their website under “supported protocols”. As I mention above I use ZoneEdit as my provider. In the /etc/ddclient.conf

protocol=zoneedit1
server=www.zoneedit.com
login=<zoneedit username>
password=<zoneedit password>
<my.domain.name, my2nd.domain.name>

Running ddclient as a Daemon

To run ddclient as a daemon modify the /etc/default/ddclient configuration file.

set run_daemon="true"

Troubleshooting

To help you troubleshoot you can run ddclient on the command line with debugging and verbose messages enabled.

$ ddclient -debug -verbose

Building a Server at Home

, , , No Comments »

This is a high level overview of what I did to build my server at home.

Hardware for the Server

For my server I recycled an older desktop, which works well since most unix operating systems uses less resources than Microsoft Windows.

Hardware Specifications for My Server:

Model:
IBM NetVista 8307-51U
Processor: Intel Pentium 4 1.8 GHz 512K L2 cache
Memory: 512 MB
Hard Disk: 40GB HD 7200 rpm
CD-ROM: 48X CD-ROM
Ethernet: 10/100
Video: Integrated Intel 845G

Building the Server

I decided to build a LAMP (Linux, Apache, MySQL, PHP) platform for my server. For the Linux operating system, I chose Ubuntu because it was very easy to install, provided a lot of documentation online, as well as it had great community support.

Setting up the Network/Router

For the server I manually gave it a static local IP address 192.168.1.100. In my router I enabled port forwarding for ports 80 (for HTTP) and ports 22 (for SSH) to forward to 192.168.1.100.

Registering a Domain Name

To register for a domain name I use GoDaddy because they are currently the cheapest provider that I can find, and domain managing was through their web based interface which makes things really easy.

Setting up Dynamic DNS

My ISP provider provides me with a dynamic IP address, therefore I had to search for a DNS service that provided dynamic DNS support. I registered at ZoneEdit because it provides the service free for up to 5 domains. After successfully registering, ZoneEdit provided me with two name servers which I had to update my domain name to use through GoDaddy.

Setting up Dynamic DNS client

I use ddclient to update my dynamic DNS entries for ZoneEdit. The client is ran as a service which get executed every 5 minutes. When it awakes, it connects to my router and extracts the WAN IP address. If the address has changed then it’ll update my entry in ZoneEdit.

After I finish configuring everything I’m able to connect to my server using the domain name I registered at GoDaddy vincentkong.com. I can now then setup the rest of the services that I want to be available on my server. e.g. Apache, FTP, SSH, SMTP, etc.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in