Hi guys,
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.
: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
}}
Can someone help me modify this script, so it will also send me emails to notify me. And this email is sent out ONLY IF pppoe-out address is changed.
For example, email body should be like
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
I’ve searched this forum, and found out this thread
http://forum.mikrotik.com/t/how-to-mail-me-if-isp-ip-change-pppoe/100611/1
Thanks and have a good day.