nlffel439 Posted April 28 Share Posted April 28 Hi folks, I have a problem with a GeoLocation Drop Policy: I would like to add some countries to a DROP policy as an exception. Normally this is no problem, I write the countries with .NOT in the policy and these are then not dropped. For example: add responder policy DROP_non_Test_CUSTOMER "CLIENT.IP.SRC.MATCHES_LOCATION("*.US.*.*.*.*").NOT && CLIENT.IP.SRC.MATCHES_LOCATION("*.CA.*.*.*.*").NOT && CLIENT.IP.SRC.MATCHES_LOCATION("*.GB.*.*.*.*").NOT" DROP However, I now have to create a policy with about 30 countries that should be allowed. And here is the problem of exceeding the maximum number of characters in a policy. With a DROP policy, understandably, no NEXT works so that I can add another one underneath. How could I still add the countries to the selection? Does anyone have any ideas? Link to comment Share on other sites More sharing options...
Solution Rick Davis Posted April 28 Solution Share Posted April 28 You can use the AppExpert expression LOCATION.GET(1) to compare just the the County Code against a list of countries. Since country codes are only two characters, Regex would be a decent way to get your list of 30 into a single expression: CLIENT.IP.SRC.LOCATION.GET(1).SET_TEXT_MODE(ignorecase).REGEX_MATCH(re/US|CA|GB/).NOT Ref A Pattern Set makes large groups of conditions more organized, easier to read, and easier to update. This is the optimal solution, particularly when using longer Geo names or frequently making adds/moves/changes to the list, and particularly useful for delegating management of the list. add policy patset countrylist bind policy patset countrylist US bind policy patset countrylist CA bind policy patset countrylist GB add responder policy DROP_non_Test_CUSTOMER "CLIENT.IP.SRC.LOCATION.GET(1).SET_TEXT_MODE(ignorecase).EQUALS_ANY("countrylist").NOT" DROP Ref 1 Link to comment Share on other sites More sharing options...
nlffel439 Posted April 28 Author Share Posted April 28 GREAT! Thanks for the quick help The solution with the pattern set was exactly what I was looking for, first test looks promising ! Thanks also for the reference article :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now