Hurricane Electric's IPv6 Tunnel Broker Forums

Advanced search  

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Author Topic: Automating tunnel updates with dynamic IPv4 address  (Read 3870 times)

mhenriday

  • Newbie
  • *
  • Posts: 3
Automating tunnel updates with dynamic IPv4 address
« on: April 26, 2012, 11:31:26 AM »

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» :
Code: [Select]
#!/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
Logged

Tymanthius

  • Newbie
  • *
  • Posts: 23
Re: Automating tunnel updates with dynamic IPv4 address
« Reply #1 on: April 26, 2012, 01:42:58 PM »

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.
Logged

mhenriday

  • Newbie
  • *
  • Posts: 3
Re: Automating tunnel updates with dynamic IPv4 address
« Reply #2 on: April 26, 2012, 03:15:10 PM »

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
Logged

kriteknetworks

  • Sr. Member
  • ****
  • Posts: 259
    • aRDy Music
Re: Automating tunnel updates with dynamic IPv4 address
« Reply #3 on: April 27, 2012, 05:07:03 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.
Logged

mhenriday

  • Newbie
  • *
  • Posts: 3
Re: Automating tunnel updates with dynamic IPv4 address
« Reply #4 on: April 29, 2012, 12:56:17 AM »

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 :
Quote
Test 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 -
Quote
Create 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
Logged