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 URI.
So the IP check is easy to do with something like this:
when CLIENT_ACCEPTED
{
if {[IP::addr [IP::remote_addr] equals 205.229.151.206/255.255.255.255]} or
{[IP::addr [IP::remote_addr] equals 65.61.115.222/255.255.255.255]}
{pool QATest01-02-Port80}
else
{reject}
}
And the URI redirect to different pools is also easy to do with something like:
when HTTP_REQUEST
{
if {[HTTP::uri] contains "qatest01"}
{pool QATest01-Port80}
if {[HTTP::uri] contains "qatest02"}
{pool QATest02-Port80}
else
{pool QATest01-02-Port80}
}
But I'm not sure how to combine them.
I do have one additional question, there is about 20 IPs that are allowed in so I want to know if there is a better way to do that then what I have, or is that the approach the best?
Thanks,
Shawn
13 Replies
Sort By
- Gerald_Chisholm
Nimbostratus
You referenced a guide in the last response, can you tell me where it is? - I believe Citizen was referring to the BIG-IP product manual available at http://ask.f5.com (Click here)
- Shawn_Puckett_8
Nimbostratus
That's great! Thanks!
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