Forum Discussion
Jim_Sellers_106
Oct 03, 2011Nimbostratus
Path 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 ...
Hi 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
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