https://mum.mikrotik.com/presentations/ ... _Megis.pdf
WARNING: as this script uses a lot of mangle rules it is not very cpu efficient, but I optimized it the best I knew how.
this script is customizable you just need to change the following:
1. The package name and data limit on line #4 ie
Code: Select all
local listlimit value=[:toarray {"Surfer";107374182400;"Streamer";644245094400;"Binger";858993459200;"Business";1610611911367}]
2. The list name on line #7 ie
Code: Select all
foreach k,v in=[ip firewall address-list print as-value where list=Surfer-List || list=Streamer-List || list=Binger-List || list=Business-List]
this script creates a warning log that the ip address has gone over their limit. if you wish to have it warn you a different method it is on you to modify
for this script to work you must create a slight variation to the mangle in the QOS document above
here is an example of the change on my "Streamer" package
Code: Select all
/ip firewall mangle
add action=mark-connection chain=forward comment="Streamer Traffic" \
new-connection-mark=Streamer-Connection passthrough=yes src-address-list=\
Streamer-List
add action=mark-packet chain=forward connection-mark=Streamer-Connection \
new-packet-mark=Streamer-Packet passthrough=yes
add action=jump chain=forward jump-target=Streamer packet-mark=\
Streamer-Packet