at the moment I am working on two scripts in parallel. While one is supposed to update my DNS entry at no-ip.com the other should keep my public IP current with tunnelbroker.com. Both services offer API's via http, so the fetch command seems ideal to get the job done. However, it has occured to me, that it is not as simple as it sounds.
For the tunnnelbroker service offered by Hurricane Electric, I need to access the following URL:
Code: Select all
http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=78.53.216.104&pass=SOME-MD5-HASH&user_id=SOME-LARGE-CRYPTIC-NUMBER&tunnel_id=40298
Code: Select all
/tool fetch mode=http port=80 address=ipv4.tunnelbroker.net host=ipv4.tunnelbroker.net src-path="/ipv4_end.php?ipv4b=78.53.216.104&pass=pass=SOME-MD5-HASH&user_id=SOME-LARGE-CRYPTIC-NUMBER&tunnel_id=40298"
For the no-ip.com domain services the story becomes even more complicated. While the URL I have to call is straight forward (http://dynupdate.no-ip.com/nic/update?hostname=babylon5.hopto.org) the page requires basic http authentication. So I tried to pass along that information with the fetch command.
Code: Select all
/tool fetch mode=http port=80 address=dynupdate.no-ip.com host=dynupdate.no-ip.com src-path="/nic/update?hostname=babylon5.hopto.org" user=some-username password=some-password
Greetings from Germany,
Rabbit@Net
-----------------------
Running RouterOS 4.3 on RB450G