For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

F5user13_114603's avatar
Mar 25, 2017
Solved

iRULE 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!  
  • kunjan_118660's avatar
    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"
    
        }
    
    }