Detect if iphone / ipad connects to VPN via public wifi

We have an application in which certain functions should only work when the user is connected to a router associated with his account (we have some information about user accounts and home routers). However, the user can configure a VPN connection to his home router through any public wifi / 3G network. We want to block certain functions, if so.

Any ideas on how this can be detected using any of the existing iphone / ipad apis?

Thanks Hetal

+6
iphone ipad wifi vpn
source share
2 answers

The kSCNetworkReachabilityFlagsTransientConnection flag is available in the accessibility API. This is true if you are connected via VPN and false if you are not connected through VPN. We used this flag value to check our conditions.

+6
source share

There is no iOS API (at least for the public) that will give you information about whether you work on a home router or a public Wi-Fi connection. You can only determine that you are on a WiFi connection against 3G. (for example, see an example of achieving an opportunity)

You might be able to do some kind of search based on the current IP address of the device. You need each user to register their IP address of the router and check its application before starting, etc. But there would be no guarantee that the user's home router would be protected. In other words, it can be as wide open as public WiFi.

+1
source share

All Articles