Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I connect to a bunch of WiFi hot spots with my iPhone, and love that I have a VPN option.

One thing I don't love is that it disconnects from the VPN if the screen ever goes blank.

How can I keep the VPN connected so I don't have random emails or other data in the open for man-in-the-middle attacks?

share|improve this question

migrated from superuser.com Aug 18 '11 at 15:57

This question came from our site for computer enthusiasts and power users.

    
The way IOS works, I don't think you can do this unless you disable the standby/auto lock timer. –  wilhil Aug 18 '11 at 12:50
add comment

2 Answers 2

up vote 2 down vote accepted

According to this thread this is standard for most users. But there is Jailbreak solution with external app called Insomnia

Insomnia is an iPhone native application that, when enabled, will prevent the iPhone from sleeping, thus overriding its default behavior. This allows background applications to continue to run and WiFi to work long after the screen has been switched off.

(The iPhone's default behavior is to sleep 30 seconds after the screen has gone off, when not docked and charging that is).

Downside of this is your cpu etc is still running so battery will go down quickly.

There is also a tweak for Cisco VPN with SBSetting with Jailbreak that might work for non-Cisco software (as in the built-in VPN) but as I haven't tested it it's hard to say :-) It may be that the blog mentions the built-in VPN but I can't verify it myself. It's not clear whether it mentions Cisco app or the built-in VPN (and just names it Cisco VPN).

share|improve this answer
1  
:( ok. I don't wanna jailbreak though, so I'm guessing no actual solution –  Canadian Luke Aug 18 '11 at 19:57
    
Here is a code snippet to stop the idle timer. '[application setIdleTimerDisabled:YES];'. Try if it works. –  HDA Nov 5 '13 at 7:00
add comment

I have just signed up for VPN service this week and i have been having the same problem. I use it to go on Netflix and Pandora from out of the country. I have been playing around to see if i can get the VPN to stay connected. So far, I found a solution that has been working for about an hour or so now.

I have a jailbroken iPhone 4 and i have installed Backgrounder from the Cydia store, which keeps programs running even when closed or when the screen is off.

After installing this, I installed Pandora from the App Store and after launching it, I held down the Home button to background it.

So far, it seems to be working because Pandora uses my connection and if i keep it in the background, it will prevent the VPN from disconnecting.

I have only been using it for a couple of hours, so I'm not sure how good of a permanent solution it will be.

share|improve this answer
    
It would be great if you followed up with an edit to tell us whether this works well or not. –  Daи Jul 26 '13 at 20:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.