Forum Discussion
Derek_Murphy_38
Nimbostratus
Oct 05, 2010need help figuring out a proxy irule
The below post has a bunch of good information that I think has me in the right direction.
http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/aff/5/aft/1172576/afv/topic/asg/50/D...
Ben_95489
Nimbostratus
Oct 05, 2010Hey Derek,
This is definitely possible. In fact, I did something not entirely dissimilar. Check out some of the address-related commands here: http://devcentral.f5.com/wiki/default.aspx/iRules/IP.html
You can do the matching in the rule for fairly small addresses, but it is probably better to use matchclass (http://devcentral.f5.com/wiki/default.aspx/iRules/matchclass.html) for this. Here's roughly what the rule I put together looked like:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/leet/adminz/"} {
if { [matchclass [IP::client_addr] equals $::Allowed_Addresses] } {
log local0. "[IP::client_addr] matched, allowing access."
}
else {
log local0. "[IP::client_addr] did not match, redirecting user agent."
HTTP::redirect "/"
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
