If your box is behind NAT you can use the below script. It uses one of the websites to get your external IP, extracts it and updates the results using ez-ipupdate. It works for me.

#!/opt/bin/bash
ipa=$(wget -q -O - checkip.dyndns.org | sed -e 's/.*.Current IP Address: //' -e 's/<.*$//')
/usr/sbin/ez-ipupdate --address=$ipa --retrys=5 --service-type=dyndns --user=username:xxxx --host=yourhostname