Airport Express with IPv6 tunnel and dynamic IP address

airportipv6

I'm trying to set up an IPv6 tunnel through HE, using an Airport Extreme (7.6.1). I got it to work once, but have a real chicken and egg problem: I'm on a PPPoE internet connection, the Airport Express being the primary router/dialup device. Every single time it dials in, it receives a different IP address. I have set up an automated script on a machine that's permanently on, which will update HE with the current IPv4 address, but I'm running into timing issues. It seems the Airport Express only tries to establish the tunnel once after rebooting. If HE hasn't been updated by then (very likely), it will fail and apparently never try again. To make it try the IPv6 tunnel again, I need to reboot it, which makes it assume a different IP address etc etc.

Is there any solution to this conundrum? Can the Airport Express be persuaded to try reestablishing the tunnel without restarting it?

Best Answer

Right, slightly late, but I had the same problem. Although my circumstances vary a little. I am using a FortiGate FW instead. The solution should be almost the same though.

You can read my "guides" on this here:

http://blog.belodedenko.me/2013/07/dynamic-ipv6-updates-using-ddclient-for.html http://blog.belodedenko.me/2013/06/a-practical-guide-to-setting-up-ipv6.html

In summary you will need to configure ddclient with a helper script to extract your IPv4 public IP directly from the Apple router (not via default web mechanism) [see n1] and update the HE tunnel end-point (e.g.)

# /etc/ddclient.conf

daemon=300                              # check every 5 minutes
syslog=yes                              # log update msgs to syslog
#mail=root                              # mail all msgs to root
#mail-failure=root                      # mail failed update msgs to root
pid=/var/run/ddclient.pid               # record PID in file.

# update tunnel end-point address
protocol=dyndns2
use=cmd, cmd=/opt/scripts/use-apple-snmp.sh
server=ipv4.tunnelbroker.net
script=/nic/update
login=your_HE_tunnelbroker_login
password=your_HE_tunnelbroker_password
<your-HE-nick>-<#tunnel>.tunnel.tserv<#num server>.lon1.ipv6.he.net

Once your router reboots and/or and gets a new public DHCP lease, you HE tunnel will be temporarily down. Once ddclient runs and updates the HE tunnel end-point, your tunnel should come up. I've had this running for a while now, and it usually taken no more than x2 ddclient intervals (10 minutes) to get the tunnel back.

Notes:

[n1] http://ampedup.wordpress.com/2012/08/02/get-the-internet-ip-address-from-your-airport-via-bash-script/