I have a dynamic public IP from my ISP. For years I have had a script that checks the address and sends some E-Mails if the IP has changed. Most of the script was right off the Wiki. My IP seldom changes, but when it would change, the script always worked. However it appears that when I updated the RB4011iGS+ router from 6.49.8 to 6.49.15 last week, the script died. I looked at the release forum posts for every update in between and did not see anything that would relate to this. I fully admit that I am NOT a scripting expert by any means. I added a few info log entries to try to determine where it was dying and narrowed it down to one line that is directly out of the Wiki. If I run the script, the log entry “Line 2” gets logged, but “Line 3” does not. Yes, E10_Fiber_Internet is the correct name for the Interface, and I have also tried it as [ find default-name=ether10 ] with the same result.
add dont-require-permissions=no name="Check Frontier IP" owner=redacted \
policy=read,write,policy,test source=":log info \"Start IP check script\";\
\r\
\n:global CurrentFOIP;\r\
\n:log info \"Line 2\";\r\
\n:local NewIP [/ip address get [find interface=\"E10_Fiber_Internet\"] ad\
dress];\r\
\n:log info \"line 3\";\r\
\n:local OldIP;\r\
\n:local CurrentTime\r\
\n:local CurrentDate\r\
\n:log info \"line 4, \$OldIP \$CurrentTime\";\r\
\n:set CurrentDate ([:pick [/system clock get date] 0 11]);\r\
\n:set CurrentTime ([:pick [/system clock get time] 0 8]);\r\
\n:log info \"Current IP is \$CurrentFOIP\";\r\
\n:if (\$NewIP != \$CurrentFOIP) do={\r\
\n :set OldIP \$CurrentFOIP;\r\
\n :set CurrentFOIP \$NewIP;\r\
\n :log info \"Fiber IP address of \$OldIP changed to new IP of \$NewIP\
\";\r\
\n\r\
\n /tool e-mail send to=\"redacted@gmail.com\" subject=\"Frontier IP add\
ress change\" body=\"\$CurrentDate at \$CurrentTime - Frontier internet IP\
\_address change.\\n \\n Old IP address was: \$OldIP \\n New IP address i\
s: \$NewIP \\n If Old IP is blank, most likely a router startup. \\n\";\r\
\n\r\
}
The script continues with a couple more E-Mails.
Any ideas?