You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

VPN Connection Authentication Failed Trying to Reconnect

I have an iPhone 6 running iOS 8.4 and an iPad Air 2 running iOS 8.4. I am able to make a VPN connection from each of them to my ubuntu 14.04 server. The iPhone can do it through cellular network or wifi. They both work fine and all packets go through the VPN and appear on the internet as coming from the ubuntu server.


When I close the VPN connection and try to reconnect, I get a popup window that says the VPN Connection Authentication Failed. Looking at the logs on my server, the device successfully authenticates with the server, but then it closes the connection. Rebooting the server makes no difference, the devices are still unable to connect. However, rebooting the device allows it to work again. I can connect and reconnect to my server as many times as I like as long as I reboot the iOS device after each disconnect.


Turning off wifi and using the cellular network doesn't help. It is still unable to connect until the device is rebooted. The reverse is also true. After connecting through the cellular network and disconnecting, the device must be rebooted before it can connect again even if I switch it back to wifi.


Changing dpddelay, dpdtimeout, and dpdaction on the server does not make any difference.


I am using an L2TP VPN type. Putting the device to sleep and waking it back up does not allow it to connect.


I have searched far and wide, but have not seen this problem anywhere. I see it on both devices I have tried. So far the only solution I can find is rebooting the devices. Is there a way to reset whatever needs to be reset without shutting down the device?


Thanks for your help.

Ed

iPhone 6, iOS 8.4

Posted on Jul 24, 2015 1:03 PM

Reply
5 replies

Jul 24, 2015 4:15 PM in response to Kappy

I would agree with you if it didn't appear to be a problem with the iPhone and iPad.


Note that rebooting the linux server, which presumably resets its state does not correct the problem. Rebooting the iOS device does correct the problem. The iOS device is able to connect to the Linux VPN server the first time after the iOS device is rebooted. All subsequent connection requests fail. When the iOS device is rebooted, it is able to connect again.


One iOS device can connect and disconnect, but not connect again. Another iOS device can connect and disconnect as well, but it too cannot connect again. Both iOS devices can connect to the server at the same time, but once they disconnect, they can't reconnect until they have been rebooted.


It really appears to me that the iOS device must respond differently on the second and subsequent connection requests than it does on the first request. Maybe this type of request is also conforming to the protocol and the Linux implementation is not supporting it. If that is the case, it would be interesting to know what it is doing on the second and subsequent requests and why. This seems to be the forum for finding that out.


Ed

Jul 24, 2015 6:26 PM in response to Kappy

You put me on a path to getting this to work.


I had my server set up to use PAM authentication because I already had an account there that could be used for testing. CHAP was disabled. I turned CHAP on, created an account/password and now everything works.


To use iOS devices with a Linux/OpenSWAN VPN server, CHAP must be enabled on the server. Otherwise, the iOS devices must be rebooted in order to reconnect to the server.


Thanks for your help.


Ed

VPN Connection Authentication Failed Trying to Reconnect

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.