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 12, 2009Thanks for the leads hoolio!!!
I am trying this rule but get an error on line 14 "Command not valid in current context"...Can I collect the DNS name and then make a pool assignment based on that within the same iRule?
when HTTP_RESPONSE {
Hold HTTP data until IP address is resolved
HTTP::collect
Start a name resolution on the Client IP address
NAME::lookup [IP::client_addr]
}
when NAME_RESOLVED {
log local0. "client name = >[NAME::response]>"
Release HTTP data once hostname is resolved
HTTP::release
}
when HTTP_REQUEST {
set client [NAME::response]
if {$client contains "domain.com"} {
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