Forum Discussion
Domai
Altostratus
Sep 07, 2016iRule help to block traffic
Hello my intention is to block traffic from countries which are not on my safe list. So I used the below iRule when CLIENT_ACCEPTED {
if { not([class match [whereis [IP::client_addr] countr...
ekaleido
Cirrus
Sep 07, 2016when CLIENT_ACCEPTED {
set location [whereis [IP::client_addr]]
if { [class match -value [IP::client_addr] equals allow_ip] || [class match -value $location equals allow_country] } {
pool mypool
} else {
log "Dropping connection from client: [IP::client_addr], country code: [whereis [IP::client_addr] country]"
drop
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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