Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When the iPhone (4) goes to sleep, the VPN will disconnect. Is there any way to disable this behavior as it's sometimes a bit annoying.

I am jailbroken, and the server I'm connecting to is Windows Server 2008 R2 which I can edit settings on.

share|improve this question

The VPN will disconnect because your WiFi disconnects.

Therefore you would have to...

  • either reconnect your VPN connection when on 3G (How?)
  • or enable your iPhone to keep connected to WiFi (requires jailbreak)

To keep WiFi on in sleep mode you need to install KeepAwake via Cydia.

See this step-by-step guide.

share|improve this answer
I don't use WiFi though, it has got a constant 3G Conection – e__ Jan 22 '12 at 18:37

I would expect that sleeping an iPhone and staying connected to the network are incompatible goals. If you don't want to drop the VPN connection, you need to keep the device awake.

However, I found a discussion on that states that plugged-in devices are able to maintain network connections while in sleep mode.

share|improve this answer

I did 2 things and now the VPN does not disconnect even while switching from wifi to 3G.

  1. Install Cisco Anyconnect to connect to VPN network.
  2. Install KeepAwake(from cydia) --Thanks, gentmatt

Now it's all fine, i can work from anywhere on my 3GS and VPN remains connected while on the move also.

share|improve this answer

I turns on a music at background with volume turned off .. Put it on repeat, my brother turn auto lock to off on his iPod . To keep the VPN alive , and VPN will not disconnect ... But may be there's a cydia tweak for tha

share|improve this answer

This works for me iPhone 5 iso 6.1.4;

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Please write down how it works because the URL might die in the future. – Rob May 15 '14 at 11:49

a workaround that I found was on a jailbroken device, use activator and link unlocking device to a toggle to turn on VPN. Therefor every time I unlock my device the VPN reconnects so I am happy :)

share|improve this answer

hopefully this will help you.

share|improve this answer
Please do not only add link-answers without details as the links might die. – Rob Apr 1 '14 at 12:26

Your Answer


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.