Forum Discussion
Dan_Rogers_1933
Nimbostratus
Apr 28, 2009Ignore individual hosts in policies/classes
Hi all, I am trying to figure out the easiest way to ignore individual client IPs from being checked by the policy (or class). The only method I can think of is setting up a regex in the class that includes all except one client IP address, however, that would be a complex (and slow) regex. Is there an easier way to do this?
- Benjamin_9036Historic F5 AccountHey Dan,
when CLIENT_ACCEPTED { if { [matchclass [IP::client_addr] equals $::trustedAddresses] }{ set trustedHost 1 } else { set trustedHost 0 } } when HTTP_CLASS_SELECTED { if { $trustedHost eq 1 }{ Uncomment the line below to turn on logging. log local0. "Valid client IP: [IP::client_addr] - Not using ASM" PLUGIN::disable ASM } else { Uncomment the line below to turn on logging. log local0. "Invalid client IP: [IP::client_addr] - Using ASM" PLUGIN::enable ASM } }
- Dan_Rogers_1933
Nimbostratus
How silly do I feel. We do a very similar thing in some of our LTM iRules. Ben, thank you for pointing me in the right direction. I never searched for HTTP CLASS directly. - Benjamin_9036Historic F5 AccountHey Dan,
- hoolio
Cirrostratus
There is an existing request to add a filter to the HTTP class for the client IP address or network. It's a fairly common request but for some reason it hasn't been implemented. You could open a case with F5 support and ask them to attach your case to the request for enhancement.
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