范例
1
2 3 4 5 6 7 |
:global ipaddr [/ip address get [/ip address find interface=pppoe4plex] address]
:set ipaddr [:pick $ipaddr 0 ([len $ipaddr] -3)] :global oldip [/ip firewall nat get [/ip firewall nat find comment="plexdstnat"] dst-address] :if ($ipaddr != $oldip) do={ :log info [/ip firewall nat set [/ip firewall nat find comment="plexdstnat"] dst-address=$ipaddr] :log info [/ip firewall nat set [/ip firewall nat find comment="plexsrcnat"] to-addresses=$ipaddr] } |
没有评论:
发表评论