Forum Discussion
Jeff_Tuthill_10
Nimbostratus
Aug 10, 2009Pool Selection based on client domain name or IP address
So I think this may be an easy one but I am getting stuck on this. I have an application that I want to allow access to if the client has a certain domain name or is coming from a certain IP subnet......
Jeff_Tuthill_10
Nimbostratus
Aug 11, 2009So how do I get an iRule to look at two different Data Groups? Here is the scenario:
1. Check the IP addresses in data group 1 and send to pool
2. Check the hostnames (string) in data group 2 and send to pool
3. Otherwide discard
Would something like this work?:
when HTTP_REQUEST {
if { [matchclass [IP::client_addr] equals $::DATA_GROUP_NAME] } {
pool pool1
} else {
if { [matchclass [DNS::name] equals $::DATA_GROUP_NAME2] } {
pool pool1
} else {
discard
}
}
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