2025年4月20日 星期日

Mikrotik script to add NAT rules for GNS3

SNMP

:for i from=0 to=9 do={ /ip/firewall/nat add chain=dstnat protocol=udp dst-address=120.125.82.173 dst-port="6300$i" to-addresses="192.168.1.$i" to-ports=161 action=dst-nat }

:for i from=10 to=99 do={ /ip/firewall/nat add chain=dstnat protocol=udp dst-address=120.125.82.173 dst-port="630$i" to-addresses="192.168.1.$i" to-ports=161 action=dst-nat }

:for i from=100 to=255 do={ /ip/firewall/nat add chain=dstnat protocol=udp dst-address=120.125.82.173 dst-port="63$i" to-addresses="192.168.1.$i" to-ports=161 action=dst-nat }