Forum Discussion
jeff_mccombs_47
Nimbostratus
Apr 09, 2009"chaining" iRules?
Hey peeps.
I'm trying to figure out a way to chain rules together, but I'm not quite understanding how best to go about it.
What I'd like to be able to do is set up a re-usable set of rules that all sites we host get. So for example, I could have a rule that inspects the HTTP method type and drops requests for TRACE/TRACK/PROFIND etc. Another for working with Universal persistence, maybe some debug rules that could be added to log relevant information when troubleshooting, etc.
It would seem, that because you can add multiple rules to a VS, that this should be possible? Is this possible?
If so, is the order in which the rules are run based on which order they are applied to a VS? How do you code such a thing, can you have multiple "when HTTP_REQUEST{}" blocks?
Am I totally crazy for even suggesting this?
- You aren't crazy at all. Check out my tech tip on Events that describes how to use the "priority" command to control the processing order of like events.
http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=165
- jeff_mccombs_47
Nimbostratus
Posted By Joe on 04/09/2009 12:41 PM
http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=165
- 1gw_60162
Nimbostratus
I just read the iRules 101 - 11 Events explanation and am excited about writing more modular iRules. What I am confused about though is how variables work across iRules within a virtual server. What I would like to accomplish is a set of generic rules which may be used in multiple VS's, plus one unique iRule for each VS that initializes the variables for that specific VS... so each VS's resources would look something like... - hoolio
Cirrostratus
That's a good plan for configuring generic rules with a per-VIP iRule.
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