Using Dynamic DNS on Ubuntu

There is an even simpler way to update 3322 dynamic DNS: you do not need to install a client, create a configuration file, or even manually look up your IP address.

The method introduced on the www.3322.org website uses lynx (included by default on many Linux and BSD systems):

lynx -mime_header -auth=username:password "http://members.3322.net/dyndns/update?system=dyndns&hostname=domain"

Ubuntu/Debian includes w3m by default, so the command can be changed to:

w3m -no-cookie -dump 'http://username:password@members.3322.net/dyndns/update?system=dyndns&hostname=your_domain.f3322.org'

Put this command into the scheduled task list, crontab, and run it every 15 minutes to update the dynamic DNS regularly. To edit the current user's crontab file, use:

crontab -e

Crontab files created by users are usually stored in /var/spool/cron, with the filename matching the username. Example scheduled task:

*/15 * * * * w3m -no-cookie -dump 'http://username:password@members.3322.net/dyndns/update?system=dyndns&hostname=your_domain.f3322.org' >/dev/null

While I am here, I will also note how to use w3m to query your own public IP address:

w3m -no-cookie -dump www.ip138.com | grep -o "[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}"

Leave a Reply