Forum Discussion
Brian_Mayer_841
Nimbostratus
Aug 19, 2008Conditional logic based on source IP
Hi guys,
We'd like to implement an iRule that triggers on the presence of two or three specific strings in the URI. When any of the strings are found, we next want to check the source ...
The_Bhattman
Nimbostratus
Aug 25, 2008Haven't test this, but have you tried:
when HTTP_REQUEST {
if {([matchclass [HTTP::uri] contains $::cm2prod_filtered_URI]) and (not [matchclass [IP::client_addr] eq $::corporate_external_net])} { discard }
}
or
when HTTP_REQUEST {
if {([matchclass [HTTP::uri] contains $::cm2prod_filtered_URI]) and (![matchclass [IP::client_addr] equals $::corporate_external_net])}{ discard }
}
or
when HTTP_REQUEST {
if {[matchclass [HTTP::uri] contains $::cm2prod_filtered_URI] and (not [matchclass [IP::client_addr] equals $::corporate_external_net])} { discard }
}
or
when HTTP_REQUEST {
if {([matchclass [HTTP::uri] contains $::cm2prod_filtered_URI]) and (not [matchclass [IP::client_addr] equals $::corporate_external_net])} { discard }
}
Hope this helps
CB
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