ros 动态IP映射 解决回流问题!|Lei`s Blog

ros 动态IP映射 解决回流问题!

page1-1000-full/ip firewall nat add chain=dstnat dst-address=58.58.58.58 protocol=tcp dst-port=80 action=dst-nat to-addresses=192.168.2.115 to-ports=80 comment="80"

 

:global newipaddress
:global lodipaddress
:set newipaddress [/ip address get [/ip address find dynamic=yes interface="pppoe-FTTH"] address]
:set newipaddress [:pick $newipaddress 0 ([:len $newipaddress] -3)]
:set lodipaddress [/ip firewall nat get [/ip firewall nat find comment="80"] dst-address]
:if ($newipaddress != $lodipaddress) do={/ip firewall nat set [/ip firewall nat find comment="80"] dst-address=$newipaddress}

更多详细查看:http://www.txwb.com/Article/serverHelp/wbly/201009/78641.html

ros 动态IP映射 解决回流问题!:等您坐沙发呢!

发表评论

表情
还能输入210个字