Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Allow URI to specific GeoLocation

D99
Cirrus
Cirrus

I have a requirement to allow mail.sdo.ae/ecp only to UAE and block all other locations and allow all locations access to all other urls under mail.sdo.ae

Any leads on how to achieve this using LTM policies or irules will be appreciated. Many thanks in advance

4 REPLIES 4

Hi Danish,

when HTTP_REQUEST {
	if { [string tolower [HTTP::uri]] starts_with "/ecp" && [whereis [IP::client_addr] country] ne "AE" } {
		drop
	}
}

Helpful Articles:

https://clouddocs.f5.com/api/irules/whereis.html

https://support.f5.com/csp/article/K67483244

http://www.ip2country.net/ip2country/country_code.html

Instead of drop i would put a forbidden or redirect to homepage.

Thank you very much

Thanks a ton