If there are problems with interface detection in this version please let me know. This should automatically figure out which interface the current default gateway is using and send us updates using that IP - in effect allowing failover for multiple WANs as well.
When I run from the terminal it runs fine. But when I add it to scripts and setup a schedule to run the script, then it the log it just says "DDNS: Sending update" DDNS is the name of my script. But the update never goes through.
Also what I need is a bit diferent from what the script is.
I have 2 interface connected to the internet. The first one is a Public Fixed ip on ether5 on a RB150. That is used for browsing and email. It is also my default GW.
The second one is a ADSL 4MB line which is used for VoIP. As this is a capped account I only allow the VoIP traffic going through it. A have a route set to route the traffic through the ADSL Line. That words fine. My interface is called "ADSL". This is how I changed the script. Pleas see if I made any mistakes
Define User Variables
:global ddnsuser "ChangeIPUsername"
:global ddnspass "ChangeIPPassword"
:global ddnshost "*1" # Also tried the ddns url something.changeip.net
Define Global Variables
:global ddnsip
:global ddnslastip
:global ddnsinterface "ADSL"# I added this
:global ddnssystem ("mt-" . [/system package get system version] )
\
Define Local Variables
:local int
**# Loop thru interfaces and look for ones containing
default gateways without routing-marks
#:foreach int in=[/ip route find dst-address=0.0.0.0/0 active=yes ] do={
Are you really using an @ sign instead of a $ sign ?
Also - reboot the router and manually run the script. Then go to terminal and type ‘:env print’ to see what the variables show. If there are some global variables missing maybe thats the problem. It seems like 3.0 does global variables a little differently… like they are only global sometimes : )
And the Log replies " Updates Suceed" so according to that it shows me that it is picking up the variables but the dns-update don’t work from the script.
Anything else I can try?
I have no firewall rules set. thus port 443 should be opened.
I also added a rule to accept input traffic on port 443 just in case.
Ok the problem on the V3.0 and V2.9 scripts not working was that I did not press enter after the last command. Thus not going to a new line in my scripts.
Internet-----ADSL Modem (running ppoe) ----- ether1 (10.0.0.1)- MT – RF AP --------- Station — MT — ether1 — PC
When I run this script changeip.com always get the same IP address of ether1 of the edge router (10.0.0.1) and not the one dynamically assigned by ppoe to the adsl modem.
Remove all of the “commented lines”… I have just tried the script that tasmanet posted with all of the comment lines removed and it is working fantastic.
It seems that “hashed-out” comment lines are not supported, or at least not in the correct format. Remove them and all is good!