Tuesday, April 15, 2014

Hurricane Electric can handle dynamic IPv4 addresses

My ISP loves to give me a new IPv4 address each few days. Until now I used Hurricane Electric's website to update my IPv6 tunnel endpoint accordingly to get my IPv6 working again. I just discovered you can update your tunnel in another way:

curl -s 'https://myname:verysecret@ipv4.tunnelbroker.net/nic/update?hostname=123456'

You have to run this from a machine on your LAN

I created a script like this

date >> /var/log/tunnelbroker.log
curl -s 'https://myname:verysecret@ipv4.tunnelbroker.net/nic/update?hostname=123456' >> /var/log/tunnelbroker.log

and put it into my crontab. Problem solved!

Thanks to the Tunnelbroker FAQ:

My IPv4 endpoint address is dynamic. Can I still create a tunnel? If yes, what do I need to do when my IP address changes?

Yes, you can still create a tunnel even if you are using a dynamic IPv4 endpoint address. If your IPv4 endpoint address changes, you can either login to the tunnelbroker.net page and update your IPv4 endpoint address or use https://ipv4.tunnelbroker.net/nic/update which is designed to be used to update your IPv4 endpoint address.

1 comment:

Anonymous said...

Thanks for life! As a gift, let Holland be football world champion! :-)