Created
July 9, 2019 01:58
-
-
Save jjcodes78/027e3dc71c3368c9a25137ae52b48dd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:global addNetmapRules do={ | |
:for i from=0 to ($count - 1) do={ | |
:local pRange "$($portStart + ($i * $portsPerAddr))-$($portStart + (($i + 1) * $portsPerAddr) - 1)" | |
/ip firewall nat add chain=src-nat action=netmap protocol=tcp \ | |
src-address=($srcStart + ($i * 256)) to-address=$toAddr to-ports=$pRange | |
/ip firewall nat add chain=src-nat action=netmap protocol=udp \ | |
src-address=($srcStart + ($i * 256)) to-address=$toAddr to-ports=$pRange | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
como se usa este escript