Quick script I knocked up to update dynamic dns record at freedns.afraid.org, querying the router for its IP address. Uses expect to login via telnet to the router and curl to GET the http update url.
#!/bin/bash
# Siemens SE 587 freedns update script
# Jonathan Cutting mcmlxxii.co.uk
# 20/9/2009
# Config
router_login=”your_login_name”
router_password=”your_login_password”
router_address=”192.168.1.1″
afraid_url=”your_dynamic_dns_url”
afraid_update_url=”http://freedns.afraid.org/dynamic/update.php?YOUR_UPDATE_CODE”
# End config
dns_record=$(dig +short $afraid_url)
ip_address=$(expect -c ”
[...]