cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

User agent mobile app and mobile browser

Sanal_Babu
Nimbostratus
Nimbostratus

I have a requirement to block a mobile application which is having some issues at present (may take sometime to fix) .But the same time, the portal should be accessible from mobile browsers (chrome,mozilla,safari etc) . Below irule was applied but it blocked access for mobile browsers too.

 

when HTTP_REQUEST {

 if { [class match [string tolower [HTTP::header "User-Agent"]] contains Mobileapp_Useragent ] } {

  drop

  reject

 } }

 

Mobileapp_Useragent data group contains the below

 

android

iphone

blackberry

windowsphone

 

Thoughts ?

2 REPLIES 2

SanjayP
MVP
MVP

Mobile user agents and all mobile browser user agents would have these strings in common. Is there any unique identifier for your mobile application (e.g./v1.0 OurApp)? You may need to check if there is any unique identifier for your mobile applicaiton and based on that modify the iRule.

Also, noticed that you are using 2 actions drop and reject in the iRule. Please use only one of it and use return in the end.