Ah, thanks, yes I'm positive that will work just as well...
Ok folks, here you go, a script to add and remove ip's from mangle that checks to see if it needs to add/remove before adding/removing
Wack it in an interval job and it can check for comming and going of people
AddToMangle
:foreach i in=[interface find type=pppoe-in] do= {
:foreach n in=[/ip address find interface=$i] do={
:global a; :set a[/ip address get $n network];
:put ("Checking on " . $a . "/32")
:if ([/ip firewall mangle find src-address=($a . "/32")]="") do={
/ip firewall mangle add src-address=($a . "/32") p2p=all-p2p action=passthrough mark-flow=p2p-out comment=$a
/ip firewall mangle add dst-address=($a . "/32") p2p=all-p2p action=passthrough mark-flow=p2p-in comment=$a
}
}
}
RemoveFromMangle
:foreach i in=[/ip firewall mangle find mark-flow=p2p-out] do= {
:global a; :set a [/ip firewall mangle get $i src-address];
:log message=("Checking on " . $a )
:if ([/ip route find dst-address=$a]="") do={
:foreach n in=[/ip firewall mangle find dst-address=$a] do={
/ip firewall mangle remove $n
}
/ip firewall mangle remove $i
}
}