Hurricane Electric's IPv6 Tunnel Broker Forums

Advanced search  

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Author Topic: Tunnelbroker.net API Documentation  (Read 9801 times)

kcochran

  • Sr. Network Engineer, Hurricane Electric
  • Administrator
  • Sr. Member
  • *****
  • Posts: 398
    • View Profile
Tunnelbroker.net API Documentation
« on: April 17, 2014, 07:16:49 AM »

API Parameters
  • USERNAME: The account username
  • USERID: The account User ID
  • PASSWORD: The account password
  • MD5PASS: The MD5 hash of the account password
  • UPDATEKEY: Usage key as defined on the tunnel's Advanced tab
  • IPADDRESS: Client Endpoint IPv4 address
  • TUNNELID: Tunnel id #
 
  IMPORTANT: For API calls which operate on a single tunnel, if an Update Key is set for that specific tunnel, it must be used instead of the account password or password MD5 hash.
 
  Many embeded systems (routers, WiFi access-points, etc.) use the historic update API, and will often MD5 the password set prior to sending the update.  In this case, you will need to remove the Update Key set for the tunnel, and use your account password directly.

Tunnel Information API
 
Code: [Select]
https://USERNAME:PASSWORD@tunnelbroker.net/tunnelInfo.php  Returns an XML structure with all of your tunnels' configuration settings.  See https://forums.he.net/index.php?topic=3109.0 for structure details.

 
Code: [Select]
https://USERNAME:PASSWORD@tunnelbroker.net/tunnelInfo.php?tid=TUNNELID  Returns an XML structure with this specific tunnel's configuration settings.
 
Tunnel Client Endpoint Update APIs

 NOTE: Please only trigger an update when your IP address changes!

 https://ipv4.tunnelbroker.net/nic/update (Preferred)
   The following scripts conform to the Dyn DNS Update API (as documented at http://dyn.com/support/developers/api/).  We only support HTTPS updates.
   
Code: [Select]
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=TUNNELID&myip=IPADDRESS
https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID&myip=IPADDRESS
   Update the listed tunnel's client endpoint to the specified IP.
   
Code: [Select]
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=TUNNELID
https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID
   Update the listed tunnel's client endpoint to the IP address making the update request.
 
https://ipv4.tunnelbroker.net/ipv4_end.php (Deprecated)
   The following scripts return either +OK or -ERROR followed by a descriptive message.
   
Code: [Select]
http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID   (Not recommended)

Code: [Select]
https://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID&ip=IPADDRESS
   Update the listed tunnel's client endpoint to the specified IP.

Code: [Select]
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID   Update the listed tunnel's client endpoint to the IP address making the update request.
« Last Edit: March 02, 2015, 11:14:54 PM by kcochran »
Logged

mathivanan

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Tunnelbroker.net API Documentation
« Reply #1 on: July 07, 2015, 03:57:34 AM »


Based on the below information ,I have been using the below command for IP update using API:

wget --no-check-certificate -T10 -a - "https://ipv4.tunnelbroker.net/nic/update?username=${TUNNEL_USER_NAME}&password=${TUNNEL_UPDATE_KEY}&hostname=${TUNNEL_UNIQUE_ID}&myip=${CURRENT_EXTERNAL_IP}"


I t was working well for the past 6 months.Recently it has been failing to update the Tunnelbroker website with the new IP address.I checked the return status of the above command; and it is a success. I suspect a problem with tunnelbroker website. Please suggest if it the reason or help me by pointing in the right direction.

Thank you


API Parameters
  • USERNAME: The account username
  • USERID: The account User ID
  • PASSWORD: The account password
  • MD5PASS: The MD5 hash of the account password
  • UPDATEKEY: Usage key as defined on the tunnel's Advanced tab
  • IPADDRESS: Client Endpoint IPv4 address
  • TUNNELID: Tunnel id #
 
  IMPORTANT: For API calls which operate on a single tunnel, if an Update Key is set for that specific tunnel, it must be used instead of the account password or password MD5 hash.
 
  Many embeded systems (routers, WiFi access-points, etc.) use the historic update API, and will often MD5 the password set prior to sending the update.  In this case, you will need to remove the Update Key set for the tunnel, and use your account password directly.

Tunnel Information API
 
Code: [Select]
https://USERNAME:PASSWORD@tunnelbroker.net/tunnelInfo.php  Returns an XML structure with all of your tunnels' configuration settings.  See https://forums.he.net/index.php?topic=3109.0 for structure details.

 
Code: [Select]
https://USERNAME:PASSWORD@tunnelbroker.net/tunnelInfo.php?tid=TUNNELID  Returns an XML structure with this specific tunnel's configuration settings.
 
Tunnel Client Endpoint Update APIs

 NOTE: Please only trigger an update when your IP address changes!

 https://ipv4.tunnelbroker.net/nic/update (Preferred)
   The following scripts conform to the Dyn DNS Update API (as documented at http://dyn.com/support/developers/api/).  We only support HTTPS updates.
   
Code: [Select]
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=TUNNELID&myip=IPADDRESS
https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID&myip=IPADDRESS
   Update the listed tunnel's client endpoint to the specified IP.
   
Code: [Select]
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=TUNNELID
https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID
   Update the listed tunnel's client endpoint to the IP address making the update request.
 
https://ipv4.tunnelbroker.net/ipv4_end.php (Deprecated)
   The following scripts return either +OK or -ERROR followed by a descriptive message.
   
Code: [Select]
http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID   (Not recommended)

Code: [Select]
https://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID&ip=IPADDRESS
   Update the listed tunnel's client endpoint to the specified IP.

Code: [Select]
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID   Update the listed tunnel's client endpoint to the IP address making the update request.
Logged

AndrewButterworth

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Tunnelbroker.net API Documentation
« Reply #2 on: September 19, 2015, 05:03:58 PM »

I have been using the HTTP method to update my tunnel endpoint IPv4 address for a while now (http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID) along with the 'ip=AUTO' variable.  This has now stopped working and I get an error of 'INVALID IPV4 ADDRESS' - I assume because the HTTP method has now been depreciated in favour of the HTTPS method.
If I use the preferred HTTPS method via a browser (https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID), this works fine, however I am automating this on a Cisco IOS router with a TCL script (ipv6-tunnel-update.tcl) triggered by the interface going up.  I have modified the script to use the new API parameters but it appears the TCL script doesn't support HTTPS so it doesn't work.
Has anyone else hit this issue and has a workaround?

Thanks, Andy
Logged

kcochran

  • Sr. Network Engineer, Hurricane Electric
  • Administrator
  • Sr. Member
  • *****
  • Posts: 398
    • View Profile
Re: Tunnelbroker.net API Documentation
« Reply #3 on: September 19, 2015, 11:16:04 PM »

Bug in the script.  Should be better.
Logged

AndrewButterworth

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Tunnelbroker.net API Documentation
« Reply #4 on: September 20, 2015, 02:06:46 AM »

Bug in the script.  Should be better.

OK, I have changed the EEM TCL script back to the original (http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID) and I am now getting '-ERROR: Invalid API key or password'?

EDIT:  Sorry, my bad I changed the password as it had '$' in it that the EEM script was interpreting...    Just re-MD5 hashed the new password and its working again now using the original HTTP method.

Thanks, Andy
« Last Edit: September 20, 2015, 02:34:07 AM by AndrewButterworth »
Logged

Delotd89

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Tunnelbroker.net API Documentation
« Reply #5 on: April 11, 2017, 12:29:43 PM »

Bug in the script.  Should be better.

OK, I have changed the EEM TCL script back to the original (http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID) and I am now getting '-ERROR: Invalid API key or password'?

EDIT:  Sorry, my bad I changed the password as it had '$' in it that the EEM script was interpreting...    Just re-MD5 hashed the new password and its working again now using the original HTTP method.

Thanks, Andy
Logged

snarked

  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: Tunnelbroker.net API Documentation
« Reply #6 on: April 12, 2017, 12:21:35 PM »

Note:  Internet Explorer ("exploder") does not understand URLs with an embedded ID/PW.  However, the parameter version ("?username=...&password=...") does work with IE 11.
Logged