http - Why my iRules on BIG-IP F5 does not work? -
i want limit http::request rate 1 client, below irules:
when http_request { if { [http::uri] == "/user/loginpub.jsp" } { if { [clock seconds] == $cur_time } { if { $req_count > 1 } { http::respond 501 content "request blocked." } incr req_count return } set req_count 0 set cur_time [clock seconds] } } but when apply virtual-server, requests uri (/user/loginpub.jsp) reseted. chrome shows "connection reset".
why doesn't work? wrong ? thanks
this rule should not causing connection reset, suspect there else going on site. said, it’s not going want either. [clock seconds] never going equal $cur_time since didn’t assign value $cur_time before using it.
there’s example of rate limiting rule should able adapt on f5’s site:
https://devcentral.f5.com/login?returnurl=%2fwiki%2firules.ratelimit_httprequest.ashx
(free account needed read article.)
Comments
Post a Comment