How to limit a user to a given amount of traffic?

By admin

Diambil dari http://forum.mikrotik.com/viewtopic.php?f=9&t=20420

:local sum; :local traf;
:set sum 0
/ip firewall rule forward {
:foreach i in [find] do={:incr sum}
:for i from=1 to=$sum  do={
:set traf [get [find comment=("user" . $i)]
bytes]
:set traf ($traf/1073741824)
:if ($traf>1) do={:log facility=System-Info \
message=("user" . $i ." exceeded 1Gb limit!")}
}
}

Related Posts

  1. Burst for each TCP connection
  2. Disconnecting the users with bad signal [2.9.X]
  3. Mikrotik: membuat hotspot baypass traffic IIX
  4. How to stop (smtp) viruses !!
  5. How to prevent NATed access
  6. Mikrotik: case hotspot stiki.ac.id

No Comments