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

Automating tunnel updates with dynamic IPv4 address

Started by mhenriday, April 26, 2012, 11:31:26 AM

Previous topic - Next topic

mhenriday

I had no problem following the instructions and installing an IPv6 tunnel on my 64-bit Ubuntu 11.10 box, but since the address provided by my ISP is dynamic, I have to renotify HE everytime I reboot and the address is changed. Could someone of greater experience than I possess help me with a simple script to automate this procedure, so that my HE URL is automatically called upon rebooting the machine ? I tried writing the following script which I named «tunneluppdatering.sh» :
#!/bin/bash
curl https://mhenriday:[my password]@ipv4.tunnelbroker.net/ipv4_end.php?tid=[my ID]

and entering the command «./<path to tunneluppdatering.sh>», but got a «file or directory not found» error for my pains.

Am I making a simple script error here (my experience in writing scripts is minimal) or am I barking up the wrong tree entirely ?...

Grateful for any and all suggestions !

Henri

Tymanthius

I can't troubleshoot the script itself, but did you remember to chmod a+x  on the script before you tried to run it?  That would give everyone permission to run it.

You may want to chown the script to root, then chmod o+x so that only the owner, root, can run it.

mhenriday

Thanks for your speedy reply, Tymanthius ! I did indeed do «chmod +x <path to tunneluppdatering.sh>», and I also checked file permissions under «Properties» by right-clicking the file ; everything seemed hunky-dory, but as I wrote above, attempts at running the command lead invariably to a «file or directory not found» message. Alas, scripts are not my forte....

Henri

kriteknetworks

Quote from: mhenriday on April 26, 2012, 11:31:26 AM
curl https://mhenriday:[my password]@ipv4.tunnelbroker.net/ipv4_end.php?tid=[my ID]
and entering the command «./<path to tunneluppdatering.sh>», but got a «file or directory not found» error for my pains.

If you are in fact using ./ you are aware ./ denotes current working directory, right? You want to use full path if such is the case.

mhenriday

Thanks for your reply, kriteknetworks ! I have, in fact, been using the full path ; the odd thing is that while the script itself now seems to be working as it should :
Quote/home/mhenriday/Dokument/tunneluppdatering.sh
+OK: Tunnel endpoint updated to: 79.136.1.108mhenriday@mhenriday-GA-990FXA-UD3:~
when I now check my connectivity at test-ipv6.com, I find that no IPv6 address is detected :
QuoteTest with IPv4 DNS record         
ok (0.728s) using ipv4
Test with IPv6 DNS record         
bad (0.366s)
Test with Dual Stack DNS record         
ok (0.541s) using ipv4
Test for Dual Stack DNS and large packet         
ok (0.213s) using ipv4
Test IPv4 without DNS         
ok (0.387s) using ipv4
Test IPv6 without DNS         
bad (0.016s)
Test IPv6 large packet         
bad (0.021s)
Test if your ISP's DNS server uses IPv6         
ok (0.726s) using ipv4
Thus my present situation is that HE insists that I do have a tunnel -
QuoteCreate New Tunnel
You currently have 1 of 5 tunnels configured.

    If you are trying to reclaim a tunnel simply use your last IPv4 address here. If you have any issues please email ipv6@he.net.
    If you have a public ASN and wish to setup a full BGP feed, please use this form instead.

IPv4 Endpoint (Your side):
You already have a tunnel to this IP.
You are viewing from:79.136.1.108
We recommend you use:Checking...
- but I find myself unable to use it. What's going on ?...

Henri