-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VPN Disconnecting Intermittently on Apple devices #346
Comments
Yeah you don't need those ports open |
also getting DC's from AWS...connecting to nova ...I also tried different server types since originally I thought it was a byproduct of the free tier but even on a paid tier with a dedicated CPU it happens. Was thinking of trying Amazon Lightsail instead of EC2 but haven't gotten to it yet. |
I'm experiencing the same issue on iOS 10.3 across multiple devices. The VPN is hosted in AWS US-WEST2 (OR). |
I use iOS 10.3.2 Beta 1 and I got the same problems. |
Seeing the same thing on Azure with iOS 10.3 as the client |
EDIT: _On windows 10 go to network connections (right click start menu and go to network connections) < right click your algo connection < properties < security < advanced < uncheck mobility or set number super high. also did "reg add HKLM\System\CurrentControlSet\Services\Rasman\Parameters /v NegotiateDH2048_AES256 /t REG_DWORD /d 1 /f Haven't had any discos since. If it continues it might be related to MTU somehow. May need to be adjusted server side, but haven't had time to dive in further._ |
@biffalo Cool, I'll try that out. I've also been having issues on windows 10. Since I imagine there are many things which would be causing this so it might be hard to track down. I read online that some people switched their VPN network from being a public network in windows to a private network (which enables network device discovery on windows clients). I think I might try it but I'm concerned about potential security issues. |
@sregister Changing firewall location won't fix it. Firewall just says what ports can be open closed for programs etc. Network discovery on your vpn shouldn't really hurt security wise since you'd only be discover-able by other clients on your algo vpn ;) |
This smells like an issue related to timeouts and keep-alive windows. |
If helpful: |
Also experienced DCs across iOS devices on EC2 AWS US-WEST2 (OR). Same configuration set up on Digital Ocean droplet has had no problems so far after one night/day. |
I changed the dead peer detection to High in the mobileconfig and haven't noticed and issue:
The weird thing is when I turn on the screen after some idle time, the status bar only shows LTE. After a few secs, Wifi + VPN shows up. When I go to VPN settings however, the time connected doesn't appear to have reset to 0. |
I was facing disconnection problems before on a own local ubuntu server. iOS 10.3.1 |
@kiratp's modification does maintain a steady connection on my iOS device that was previously disconnecting. Unfortunately, it also came with a significant (negative) impact to battery life. |
@ananonuser - My solution is a workaround since it just ups the keep alives and reconnects. We need to figure out why disconnects are happening in the first place DPD at High is per minute while medium is every 10 mins. 10x the power :) |
I seem to be experiencing a related issue on macOS 10.12.4. I have two access points in my house and when I move from one to the other, the VPN disconnects. At the new access point, it will fail to reconnect after several attempts. If I wait several minutes before attempting again, it will successfully reconnect at the new access point. Enabling VPN on demand to automatically connect on wifi doesn't seem to help. Is there are limit on number of reconnects before it blocks you out for several minutes? |
I think I found the reason for disconnects - on GCP at least:
the Apple DeadPeer Detection setting at medium is 10 mins... More on keep-alive - maybe we can solve this on the server side: https://cloud.google.com/compute/docs/troubleshooting#communicatewithinternet |
I see that #437 disables DPD and am asking if that's the right approach long term? Or are we just doing this until we move to a newer rev of strongSwan? |
We're not upgrading the base image of Ubuntu to 17.04 yet. We're also not compiling strongSwan from source since that's not the way to do things with Ansible. As a result, we disabled DPD which was the strongSwan recommended solution for 5.3.5. This may have resolved the root cause of this issue. I'm going to close this ticket for now while we work on things like getting Windows clients and GCE servers to the same position. |
I built my VPN server using the archive/master.zip of July 9, 2017. It is running on AWS, as per the documentation. I built it from a Mac. However, I am experiencing the "random" disconnects mentioned in this ticket on all my Apple platforms: Mac, IOS-ipad, IOS-iphone. I am wondering in light of @dguido 's comment, that maybe this ticket should be reopened. UPDATE 2 August 2018I have since migrated from AWS to Digital Ocean. What a difference!!!!
I couldn't be happier with this system! |
The disconnects are definitely still happening with the latest master build and IKEv2 on macOS. They usually happen around the 10 minute mark. Messing around with |
I continue to experience random disconnects on all Apple devices: MacOS, IOS (ipad and iphone). Using VPN build of July 9, 2017 on AWS. This is really a hassle! Is there any solution? Thanks! Sometimes the Mac stays up for a day or two, but usually disconnects much sooner. |
Likewise, the VPN won't remain connected for me. OS X 10.12.6. Tried DeadPeerDetectionRate on None. Didn't help. |
I continue to experience random disconnects on all Apple devices (MacOS, IOS ipad and phone). It would be nice if this ticket could be reopened. And then:
Otherwise, I am left continually having to connect, which is definitely a hassle. I love the project! But we need to come to some sort of fix, agreement, or explanation. Thankyou. |
While your problem of random disconnects may differ from mine (#727) of not being able to connect multiple macOS and iOS devices simultaneously, you might consider whether you're also dealing with a router issue. Do you experience random disconnects when your devices are connecting through routers on other networks? |
I'm definitely still having these exact same disconnect issues on my iPhone and iPad with Algo running on an Amazon Lightsail US-WEST2 instance. The result is my iPhone and iPad lose all internet access until they reconnect successfully, so I end up disabling the VPN and trying to enable it again a couple hours later, which usually works, but it's annoying to have to do so. I'm hoping this ticket can be reopened and the issues further researched |
Same issue, but mine has never successfully connected, just pings back and forth between "connecting". |
Guys! I found the solution!
|
If I understand correctly, you're saying that using a Let's Encrypt certificate and a new subdomain will solve iOS connection dropping problems? |
This still occurs as of version 1.1 on a DO droplet. I've noticed this on hotel wifis. Haven't been on a trusted network to verify there. |
That might be more of a hotel (or other public space) Wi-Fi problem, as I've noticed my MacBook Pro has problems connecting on hotel Wi-Fi since 10.14. I've added https://captive.apple.com/hotspot-detect to my bookmarks, which seems to help. Wireguard also seems to work better than IPsec. |
OS / Environment
macOS Sierra 10.12.3/iOS X devices
Router: Apple Time Capsule (5th generation). UDP ports 500 and 4500 open (see below)
Ansible version
2.2.0.0
Version of components from
requirements.txt
setuptools>=11.3
ansible>=2.1,<2.2.1
dopy==0.3.5
boto>=2.5
boto3
azure==2.0.0rc5
msrest==0.4.1
apache-libcloud
six
pyopenssl
jinja2==2.8
Summary of the problem
Algo is up and running but the VPN keeps disconnecting intermittently. It will eventually reconnect after a few minutes. It will also reconnect if I turn off wi-fi and reconnect, or if I switch from my regular network to the 5 GHz network and vice versa. If there is another post on this matter please send the link so I can troubleshoot accordingly--I couldn't find one.
Steps to reproduce the behavior
Use devices while connected to VPN. They will eventually drop and reconnect. According to the Amazon AWS documentation on VPNs, this could be due to ports not being open. http://docs.aws.amazon.com/AmazonVPC/latest/NetworkAdminGuide/Introduction.html
I opened UDP ports 500 and 4500 and the issue is still occurring on all my devices (MacBook Pro, iPad, iPhone)
The way of deployment (cloud or local)
Cloud (Amazon EC2); connecting to Oregon region
Expected behavior
No disconnects
Actual behavior
Intermittent disconnection of VPN.
Full log
The text was updated successfully, but these errors were encountered: