Forum Discussion
RobS
Altostratus
Jun 11, 2008ACL for sub-website?
I'm pretty weak with iRules so I was wondering if anyone has an idea on how to accomplish the following:
I need an iRule that checks for users destined for a subsite on our URL and then...
The_Bhattman
Nimbostratus
Jun 11, 2008I haven't tested this but I think it might the logic you are looking for.
class subsite {
"/foo"
"/foobar"
"/feefifoo"
}
class allow {
"192.168.1.1"
"192.168.1.3"
"192.168.1.4"
}
when HTTP_REQUEST {
if { not ([matchclass [IP::client_addr] equals $::allow] && [matchclass [string tolower [HTTP::uri]] starts_with $::subsite]) } {
} else {
reject
}
}
or
class allow {
"192.168.1.1"
"192.168.1.3"
"192.168.1.4"
}
when HTTP_REQUEST {
switch -regex [HTTP::uri] {
"^XXX" {
if { not ([matchclass [IP::client_addr] equals $::allow]) }
} else {
reject
}
}
}
hope this helps
CB
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
