Forum Discussion
zahid_113975
Nimbostratus
Sep 23, 2013Based on the 2 specific string in the URL allow , then restrict ony few incoming IP addresses.
Thank you in advance for help with this.
I need to allow / restrict access to the application for the situation where same VIP will be hit for the following two cases:
Use case 1) ogw/web cont...
bwolmarans_1284
Sep 23, 2013Historic 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 23, 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.
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