Dynamic DNS Updater

From Baranoski.ca
Revision as of 12:29, 13 June 2013 by Casey (talk | contribs)
Jump to navigation Jump to search

The Problem

The Cisco implementation for Dynamic DNS updating is broken in two ways that I've found:

  • Firstly, there's Cisco Bug ID CSCtx50249, which truncates the password in the URL to 15 characters. DynDNS providers that generate a key for your domain seem to prefer 16 characters.
  • On the 830-series of routers, the DynDNS updater does not do HTTP/1.1 requests to the server, but instead an HTTP/1.0 request. This is a problem with EasyDNS, as their update server is on a virtual host, which requires an HTTP/1.1 request in order to present the user with the correct website. This doesn't appear to be an issue on the 1800 or 870-series.


The Solution

Use Cisco's IP SLA functionality to generate the proper request. This will periodically request the update page, at the specified frequency, which will update the specified hostname.

Generate The Authorization Key

Go to http://www.base64encode.org/, enter username:password and click the Encode button. Copy the whole thing, including the trailing = sign. The result is used below.

Create The IP SLA Policy

ip sla 1
 http raw http://api.cp.easydns.com
 http-raw-request
  GET /dyn/tomato.php?hostname=dyn.example.ca HTTP/1.1\r\n
  Host: api.cp.easydns.com\r\n
  Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=\r\n
  \r\n
  end
  exit
 frequency 3600
ip sla schedule 1 life forever start-time now