Forum Discussion
Justin_S
Apr 11, 2014Nimbostratus
GeoIP Whitelist iRule
I have been working on a GeoIP whitelist rule to filter traffic to a website. I created a very basic rule but it's not scalable and even less efficient. What I am trying to accomplish is referenci...
Cory_50405
Apr 11, 2014Noctilucent
Assuming you have your data group called 'allowed_country' and it's populated with countries you wish to allow access to, then this iRule should work for you:
when CLIENT_ACCEPTED {
if { ! [class match -value [whereis [IP::client_addr] country] equals allowed_country] } {
reject
}
}
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