Code: Select all
{
:local addr
:for x from=101 to=119 step=2 do={
:for i from=0 to=254 do={
:set addr value=("10.100.$x." . $i)
:if (0=[pick [/ip firewall mangle print count-only where src-address=($addr)] 0]) do={
:if [/ip firewall address-list find address=($addr) = true && list="Streamer"] do={
[/ip firewall mangle add action=passthrough chain=forward src-address=($addr)]
}
}
}
}
}
this scans a lot of IP's and takes about 10s on my 4011. I was trying to figure out a foreach loop to go through every address-list entry (Instead of every possible address) but I cannot for the life of me get the foreach loop to do what I want.