tunnelbroker.net (by Hurricane Electric) offers a free IPv6 tunnel service to encourage IPv6 adoption that you can use on your home network or with your servers. I initially used it for my home network (until my ISP officially supported IPv6 around 2013).

They also provide an excellent free DNS service, which includes “dynamic DNS” support. So if you host stuff at home, or just want to be able to ssh in from an IPv4 network, the DNS service can be updated automatically when your IPv4 address changes.

In short, here is how dynamic DNS with tunnelbroker works:

  • create/edit a “A” DNS entry, check the box “Enable entry for dynamic dns” (it may display 127.0.0.1 as your IP, if you are connecting using IPv6, it will get updated when ddclient runs)
  • after adding the new entry, a “refresh” icon will appear in the “DDNS” column of the DNS listing
  • click on that icon to generate a new key which will be used as your password.

Debian

We are now ready to configure it on the client (e.g. the home router with the public IPv4 address):

  • install “ddclient” (apt-get install ddclient, on Debian/Ubuntu)
  • the remote server is dyn.dns.he.net
  • the username is the subdomain name, ex: www.example.org
  • the password is the key that was generated earlier
  • and enter again the subdomain, as being the entry that will be updated

If you don’t have the Debian installation-wizard, in other words, you need to put something similar to this in your /etc/ddclient.conf:

pid=/var/run/ddclient.pid
protocol=dyndns2
use=if, if=ppp0

server=dyn.dns.he.net
login=my-he-username
password=somerandomkey
www.example.org,example.org

OpenWRT

Install the requirements:

1
2
opkg update
opkg install ddns-scripts wget ca-certificates curl ca-bundle

Then configure in /etc/config/ddns:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
config service "myddns_ipv4"
	option service_name	"he.net"
	option lookup_host	"dyn.example.org"
	option domain		"dyn.example.org"
	option username		"my-he-username"
	option password		"somerandomkey"
	option interface	"wan"
	option ip_source	"network"
	option ip_network	"wan"
	option enabled		"1"

The update_url is not required because he.net is a known service in /usr/share/ddns/default/he.net.json.