i007.cc

i007.cc

优先队列-降维打击

一张图讲透ros的端口映射

 

:local newIpAddr [/ip address get [/ip address find interface~"pppoe-"] address]
:set newIpAddr [:pick $newIpAddr 0 ([:len $newIpAddr] -3)]

:global oldIpAddr;
:if ($oldIpAddr != $newIpAddr) do={
    :set oldIpAddr $newIpAddr
    :log info ("new ip:" . $newIpAddr . " has been set")
    /ip firewall nat set [find action=dst-nat] dst-address=$newIpAddr
}

 

发表回复