Forum Discussion
bwolmarans_1284
Historic F5 Account
when HTTP_REQUEST {
set HOST_NAME "webserver.local"
set NO_IP_RESTRICTION_PATH "/app1"
set IP_RESTRICTED_PATH "/app2"
set DEBUG 1
if { $DEBUG } { log local0. "DEBUG: [HTTP::host] [HTTP::path] [IP::client_addr]" }
if { [HTTP::host] == $HOST_NAME } {
if { ! ([HTTP::path] starts_with $NO_IP_RESTRICTION_PATH) } {
if { [HTTP::path] starts_with $IP_RESTRICTED_PATH } {
set clientip [IP::client_addr]
if { ! ([class match $clientip equals FOX_SALESFORCE_SUBNETS]) } {
reject
}
}
}
}
}
bwolmarans_1284
Sep 24, 2013Historic F5 Account
I was working on this while JPV was posting - I'm too slow :-) In my version I tried to simplify it as best I could, and it is one iRule that does both fuctions. I Ran a little bit of testing and it seems to work. Please give it a test.