Forum Discussion
Kevin_Nail
Feb 09, 2011Nimbostratus
Datagroup and class match
Been scouring through the docs and can't find any good resource that addresses my question. Please help.
I am tasked with creating an iRule that will check incoming packets for the client_ip...
Chris_Miller
Feb 09, 2011Altostratus
Rather than checking whether their IP exists and logging it, why not just check whether it doesn't exist? The rule below will check whether their IP exists in the data group. If it doesn't, we'll drop them.
when HTTP_REQUEST {
Check if the client IP is a member of the exception list
log local0.debug "IRule has been triggered"
if { ! [class match [IP::client_addr] eq ip_exception] } {
drop
log local0.debug "[IP::client_addr] Your IP was NOT approved via the exception list"
}
}
If you'd like to add data to your external class, I suspect just using a file editor would work?
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