Hussein_Ghazy
Sep 09, 2013Nimbostratus
Limit users to 50 MB
Hi All,
i would like to limit users (per ip address) to only download from the VS 50MB (per day, per week, or per month), more than this will be dropped.
Regards
can collecting number of bytes in table per user/ip address be useful?
IP::stats wiki
https://devcentral.f5.com/wiki/irules.IP__stats.ashxsol9077: Overview of BIG-IP traffic flow
http://support.f5.com/kb/en-us/solutions/public/9000/000/sol9077.htmlv10.1 - The table Command - The Basics by Spark
https://devcentral.f5.com/articles/v101-the-table-command-the-basicsthis is just a simple IP::stats usage.
e.g.
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.20.111:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
myrule
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 2
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when HTTP_REQUEST {
set host [HTTP::host]
set uri [HTTP::uri]
}
when HTTP_RESPONSE {
log local0. "client: [IP::client_addr]:[TCP::client_port] vs: [clientside {IP::local_addr}]:[clientside { TCP::local_port}] host: $host uri: $uri bytes in: [IP::stats bytes in] "
}
}
[root@ve11a:Active:Changes Pending] config tail -f /var/log/ltm
Sep 9 16:50:15 ve11a info tmm1[16464]: Rule /Common/myrule : client: 192.168.206.33:50601 vs: 172.28.20.111:80 host: 172.28.20.111 uri: / bytes in: 519
Sep 9 16:50:15 ve11a info tmm[16464]: Rule /Common/myrule : client: 192.168.206.33:50602 vs: 172.28.20.111:80 host: 172.28.20.111 uri: /f5.gif bytes in: 4452