Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intranet web sites via VPN [closed]

Tags:

iphone

I have created an App that gets data from Web Services on an InTRAnet web site. In order for my App to see these sites I have to turn on the VPN that is setup for our company intranet. So when I turn on the VPN it asked for authentication. That has to be turned on before my App launches because I know of no way to access the VPN via code (Is there anything in the SDK for working with the VPN?)

The problem is that once my my App launches it needs to authenticate against the intranet web site (authentication can't be turned off for security reasons).

So in this scenario:

  1. User turns on VPN, enters network credentials to get access to internal network
  2. User starts App that ask for network credentials (because web server asked for auth)

So as you can see this is quite a pain (having to enter network credentials twice).

Anybody have any ideas on how I could get around this?

BTW - I'm using ASIHTTPRequest in my code.

like image 771
Lance Perry Avatar asked Jun 23 '10 12:06

Lance Perry


1 Answers

There isn't any way around it. You can't roll your own in-app VPN provider. The best you can do is to check if the user is currently connected via VPN and if not, provide some feedback that indicates they need to turn on VPN and how to do it. Until it is turned on, disable all app functionality.

As of iOS5 the process becomes a bit better though. Now you can redirect the user directly to the settings page via URL scheme. To get to the network settings, you would use this scheme:

[NSURL URLWithString:@"prefs:root=General&path=Network"]];

like image 65
memmons Avatar answered Oct 20 '22 21:10

memmons