Forum Discussion
Shawn_Puckett_8
Nimbostratus
Jan 26, 2006IP blocking and URI Redirect
We need two rules to be validated before a user is sent to a pool, first we need to make sure they are coming from an allowed IP, then we need to see if they want to go to a specific server via the UR...
JRahm
Admin
Jan 26, 2006Try this. Note that your allowed client IP addresses should replace the X.X.X.X in the class. I'd clean the real IP addresses out of your posting if they are valid.
class allowed_client_IP {
X.X.X.X
X.X.X.X
}
when HTTP_REQUEST {
if {[matchclass [IP::client_addr] eq $::allowed_client_IP]} {
if { [HTTP::uri] contains "qatest01" } {
use pool QATest01-Port80
} elseif { [HTTP::uri] contains "qatest02" } {
use pool QATest02-Port80
} else { use pool QATest01-02-Port80 }
} else { reject }
}
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