Hurricane Electric IPv6, m0n0wall, and Dynamic IPs

After years of wanting it, I finally got around to setting up an IPv6 tunnel. (My brothers’ Flash plugins weren’t too pleased for some reason, but I’ll re-enable IPv6 on their machines later)

I quickly discovered that there was one small problem though. Hurricane Electric’s doesn’t offer a DynDNS-style API for DNS-O-Matic to replicate my m0n0wall DynDNS updates to.

They do provide a more homegrown HTTP API and I tried e-mailing DNS-O-Matic to see if the could add support for it, but got no response and, since m0n0wall doesn’t let you hook on-reconnect events, I needed something ddclient-like.

I checked around to see if anyone else had m0n0wall-based solutions, but found nothing and, being the geek I am, I felt more like whipping up a custom tool in an afternoon than spending an hour trying to puzzle out the search keywords for a more flexible ddclient-alike. requires Python 2.5 (I think) and LXML (m0n0wall’s interfaces status page isn’t well-formed enough for ElementTree and I didn’t feel like doing any SAX-style parsing by hand). It’ll probably work on Windows and MacOS, but I’ve only tested it on Linux and it’s not a daemon, but that’s what cron and the Windows task scheduler are for.

To configure it, run ./ --dump-config and then edit the config file at the path it mentions. You’ll probably want to create a custom m0n0wall user that can only access the Status > Interfaces page.

Once that’s done, just stick it somewhere out-of-the-way, add a cron line like this to run it once every five minutes:

*/5     *       *       *       *       ~/bin/

It’ll only contact if your IP changes.

CC BY-SA 4.0 Hurricane Electric IPv6, m0n0wall, and Dynamic IPs by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Geek Stuff. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.

All comments are moderated. If your comment is generic enough to apply to any post, it will be assumed to be spam. Borderline comments will have their URL field erased before being approved.