Recently I'm having problems with my ISP, they are deploying NAT to save IPV4 address instead of moving to IPV6.
I used to have a script in /system/schedule to change NAT address ip.
Code: Select all
:global new
:global old
:global status
:set status [/interface get [/interface find name=("pppoe-out1")] running]
:if ($status=true) do={
:set new [/ip address get [/ip address find dynamic=yes interface=("pppoe-out1")] address]
:set new [:pick $new 0 ([:len $new] -3)]
:set old [/ip firewall nat get [find comment=("src-nat")] to-addresses]
:if (!($new=$old)) do={
/ip firewall nat set [/ip firewall nat find comment=("src-nat")] to-addresses=$new
}}
For example, email body should be like
Code: Select all
email subject xxx's (defined in script) ip address is changed to 11.22.33.44, also email body with detals like system package version, running days, average CPU usage, total data usage of pppoe-out1 (including upload and download) ...etc
viewtopic.php?f=9&t=111073
Thanks and have a good day.