Forum Discussion
Valentine_96813
Nimbostratus
Aug 23, 2011Filter 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 but have a rule in place that will filter a single or group of IPs and redirect them to a single backend server so that we can capture their session for various reasons.
Thoughts? I do this very thing filtering uris and such but never tried a source IP.
- hoolio
Cirrostratus
Hi Valentine,Datagroup containing the hosts/networks you want to pin to a pool member class ip_subnets_class { { host 1.1.1.1 network 2.2.2.0/24 } }
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 [LB::server pool] member 10.1.1.1 80 } else { Select the VS default pool pool [LB::server pool] } }
- Todd_94419
Nimbostratus
In this scenario it appears that if the client IP is a match then traffic is directed to a specific pool member... - hoolio
Cirrostratus
Hi Todd,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] } }
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