DDclient is a Perl client used to update dynamic DNS entries for accounts on a Dynamic DNS Network Service Provider. It was originally written by Paul Burry and is now mostly by wimpunk. It has the capability to update more than just dyndns and it can fetch your WAN-ipaddress in a few different ways.
Edit the included config to uncomment this line:
use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address
Then find your service of choice in the file and fill out the info as described. CloudFlare is recommended.