Forum Discussion
F5user13_114603
Cirrus
Mar 25, 2017iRULE to allow active sync access only for certain geolocation
Can anyone help me write an irule to allow active sync access only to certain geolocation.
Thanks!
- Mar 25, 2017
You can try this:
when CLIENT_ACCEPTED { set allowed 0 if { [whereis [IP::client_addr] country] eq "SG" } { set allowed 1 } } when HTTP_REQUEST { if { [HTTP::path] starts_with "/microsoft-server-activesync" and $allowed == 0 } { HTTP::respond 403 content "Active Sync is blocked" } }
kunjan
Nimbostratus
Mar 25, 2017You can try this:
when CLIENT_ACCEPTED {
set allowed 0
if { [whereis [IP::client_addr] country] eq "SG" } {
set allowed 1
}
}
when HTTP_REQUEST {
if { [HTTP::path] starts_with "/microsoft-server-activesync" and $allowed == 0 } {
HTTP::respond 403 content "Active Sync is blocked"
}
}
kunjan
Nimbostratus
Mar 27, 2017Need to test, but seems ok.
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