Hurricane Electric's IPv6 Tunnel Broker Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Author Topic: DDNS  (Read 2706 times)

matth1187

  • Newbie
  • *
  • Posts: 15
    • View Profile
DDNS
« on: March 09, 2012, 12:58:06 PM »

For those who saw my previous post on the broken dns i had, all is well now that im using he's dns. things are much smoother now and ipv6 awsomeness.

i made a script to update my A records when my isp changes my ip via the ddns url he.net provides, i thought job done, just schedule that every 10 minutes and good to go. Then i remembered the past, with other ddns providors, i would get flagged as abuse for checking/updating so frequently. So i added some checking in the script to see if update is needed.
=================================================================
I thought how nice it would be to also update the tunnel ip from the script  via the tunnel ddns url  but its not updating.

curl -4 --ssl -k "https://matth1187:xxxxxxx@ipv4.tunnelbroker.net/nic/update?hostname=123773&myip=1.1.1.1"
good 127.0.0.1

and when i login tunnelbroker and check that, nothing is updated..... any suggestions?? thanks!
==================================================================
anyway, the script below works for he.net dns so if anyone wants to try it, there you go... just make sure to change paths, urls and passwords to your own.. obviously make sure its running on the network your checking ddns for... doh

i saved the script in F:\ddns folder, but doesnt matter.

REM ///////////////// HE.NET DDNS UPDATE SCRIPT//////////////////////
set old-ip=
set new-ip=
f:
cd F:\ddns
IF NOT EXIST "old-ip.txt" echo none >old-ip.txt
FOR /f %%A IN ('curl "http://whatismyip.org"') do set new-ip=%%A
FOR /f %%B IN (old-ip.txt) do set old-ip=%%B
IF %new-ip% EQU %old-ip% (goto :eof) ELSE (Goto :update)

:update
curl -4 "http://<DDNS-URL>:<password>@dyn.dns.he.net/nic/update?hostname=<DDNS-URL>"
curl -4 "http://<DDNS-URL>:<password>@dyn.dns.he.net/nic/update?hostname=<DDNS-URL>"
curl -4 "http://<DDNS-URL>:<password>@dyn.dns.he.net/nic/update?hostname=<DDNS-URL>"
REM curl -4 --ssl -k "https://<username>:<password>@ipv4.tunnelbroker.net/nic/update?hostname=<TUNNELID>"
echo %new-ip% >old-ip.txt

« Last Edit: March 09, 2012, 12:59:49 PM by matth1187 »
Logged