I am running ubuntu, so let's start with installing ddclient
sudo apt-get install ddclient
and then edit ddclient.conf
sudo vi /etc/ddclient.conf
I use the following config
use=web, web=myip.dnsomatic.com ssl=yes server=updates.opendns.com protocol=dyndns2 login=<open-dns-username> password=<open-dns-password> <open-dns-label>