Forum Discussion
Valentine_96813
Aug 23, 2011Nimbostratus
Filter Source IP
Had a request come across my desk from a user that I had never tried before and was wondering if someone might have done this.
What is requested is to have a live pool running as intended ...
hooleylist
Dec 05, 2012Cirrostratus
Hi Todd,
Sure:
when CLIENT_ACCEPTED {
Check if the client IP is in the ip_subnets_class
if {[class match [IP::client_addr] equals ip_subnets_class]}{
Select a specific pool member from the VS default pool for members of the datagroup
pool other_pool
} else {
Select the VS default pool
pool [LB::server pool]
}
}
If you want to assign a pool per IP subnet, you could add the pool name as a value for each key in the data group and use:
Look up the client IP in the ip_subnets_class data group and save the key's value to $pool_name
if {[set pool_name [class match -value [IP::client_addr] equals ip_subnets_class]] ne ""}{
pool $pool_name
...
Aaron
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