Forum Discussion
Mazhar_Rafi_170
Nimbostratus
Dec 15, 2014Irule Help
Hello everyone,
How can I add additional Country codes and address data groups to the following irule. Let say I want to add another data group called "BRAZIL_IPs" in addition to ALLOWED_IPs_INDIA. Also I want to add brazil in the allowed CC list. Please help.
when CLIENT_ACCEPTED { set CC [whereis [IP::client_addr] country]
if { !([class match [IP::client_addr] equals ALLOWED_IPs_INDIA] or $CC equals "SA" or $CC equals "IN ) } { drop
}
}
1 Reply
- nitass
Employee
can you try something like this?
when CLIENT_ACCEPTED { if { [class match -- [IP::client_addr] equals ALLOWED_IPs_INDIA] } { India IP } elseif { [class match -- [IP::client_addr] equals BRAZIL_IPs] } { Brazil IP } else { switch [whereis [IP::client_addr] country] { SA { SA country } IN { IN country } default { somewhere else drop } } } }New Geolocation Capabilities in v10.1 by Jason Rahm
https://devcentral.f5.com/articles/new-geolocation-capabilities-in-v101Geolocation Irule
https://devcentral.f5.com/questions/geolocation-irule
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