Forum Discussion
skahler_85363
Nimbostratus
Jun 06, 2008iRule not always processing
I had emailed support to answer my question and the response back was that this was an iRule question and they seemed to infer I'd be best to ask here first.
I have written a very simple I rule to catch the word gadget in UserAgent string because the service I run get's nailed with badly written Windows Vista gadgets, to the tune of 1.5 million requests per hour. When I placed my servers behind the LTM with this iRule in place I was still seeing about 30,000 requests come through per day that contained gadget in the UserAgent string. It must be working because it's filtering out the lion's share of them and my logs tell me that all the requests are going through the LB and not getting around it some how.
So my question is: In what cases would the logic for an iRule not be applied to request passing through the LB?
- skahler_85363
Nimbostratus
Here's my iRule - Andy_Herrman_22
Nimbostratus
Could it be a case issue? You're matching against "*gadget*", but is it possible something is coming in with "Gadget"? - The_Bhattman
Nimbostratus
I think the following a more simpler iRule:when HTTP_REQUEST { if { [HTTP::header "Referer"] contains "gadget" } { discard } }
when HTTP_REQUEST { if { [string tolower [HTTP::header "Referer"]] contains "gadget" } { discard } }
- skahler_85363
Nimbostratus
Thanks I like that rule better as it's a little more clean and readable in my opinion. It's what I'll use I put this back into place.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects