• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

Working tunnelbroker API script

Started by cshilton, February 10, 2022, 11:50:28 AM

Previous topic - Next topic

cshilton

Does anyone have a working script to automatically change the tunnel's IPv4 endpoint when their residential tier ISP assigned address changes? I'm using v6 tunnels to give my house and my condo dedicated IPv6 connectivity. The house is on Frontier Fiber which has good IPv4 address stability. But the Condo is on Verizon FiOS and its IP address changes each time I power cycle my ONT. I'm using the ddclient perl script to update and track my IP address in dyndns.org but at the end of the day, that's only making it easier for me to login and manually update my tunnel. I'd strongly prefer python if possibly but I understand that beggars can't be choosers. When I experimented with the API, my experiments failed to work properly but I couldn't diagnose the reasons why.

In more detail, I'm maintaining two services between my homes, both have Hurricane Electric tunnels and both share and IKEv2 IPSec tunnel that passes IPv4 traffic. I've written a python script that will detect when any cached IPv4 address changes. I can use this script to trigger an idempotent script to update either HE tunnel or the IPSec tunnel as needed.

divad27182

See https://forums.he.net/index.php?topic=1994.0

You probably want the autodetect form.

Then you just write something like (python):

    import urllib
    f = urllib.request.urlopen(your_url)
    f.read()

and then error-check