Forum Discussion
Jim_Sellers_106
Nimbostratus
Oct 03, 2011Path Based ACL Irule
Here is the scenario
I have 9 IP addresses that I want to allow to the following path but allow access to any other URL/URI on the server.
Lets just say ...
The_Bhattman
Nimbostratus
Oct 03, 2011Hi Jim
There are several ways to this. The first thing that comes to mind is to use classes.
Using v10 as an example
class ip_path_class {
"1.1.1.1" := "/npcaccounts/ManageAccount.aspx",
"1.1.1.2" := "/npcaccounts/ManageVendor.aspx",
.
.
'
"" := "/path/blah.aspx",
}
when HTTP_REQUEST {
set sitepath [class match -value -- [IP::client_addr] ip_path_class]
if { $sitepath ne "" } {
[HTTP::uri] /$sitepath[HTTP::uri]
}
}
You can find the following link that will show you the many different instaces of using the class object
http://devcentral.f5.com/wiki/iRules.class.ashx
I hope this helps
Bhattman
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