#!/bin/sh
# 
# simples Update-Skript zur Aktualisierung der IPv4-Adresse fuer den Tunnel von Hurricane Electric
# https://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=$IPV4ADDR&pass=$MD5PASS&user_id=$USERID&tunnel_id=$GTUNID
#
# $IPV4ADDR = der neue IPv4-Endpunkt
# set ipv4b='AUTO' if you want to set the variable to the requesting client's IP address.
# set ipv4b='your_public_ipv4_address' if you want to manually provide the address.
# $MD5PASS = The MD5 Hash of your password
# Try echo -n 'yourpassword' | md5sum if you need to produce the MD5 Hash of your password
# $USERID = The UserID from the main page of the tunnelbroker (not your username)
# $GTUNID = The Tunnel ID from the tunnel_details page

# echo -n '1234abcd' | openssl md5

# Beispiel:
# curl -k -s https://ipv4.tunnelbroker.net/ipv4_end.php
# ?ipv4b=$IPV4ADDR -- AUTO fuer aktuelle IPv4-Adresse des Clients 
# &pass=$MD5PASS -- c7d6d6c62d7c8289487a979bfc980123
# &user_id=$USERID -- a400643ded59cec0c777a9a403345678
# &tunnel_id=$GTUNID -- 1034567

curl -k -s "https://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=AUTO&pass=c7d6d6c62d7c8289487a979bfc980123&user_id=a400643ded59cec0c777a9a403345678&tunnel_id=1034567"
