Skip to content
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

Download speed seems limitted #442

Closed
Pouriyahe opened this issue Sep 8, 2018 · 8 comments
Closed

Download speed seems limitted #442

Pouriyahe opened this issue Sep 8, 2018 · 8 comments

Comments

@Pouriyahe
Copy link

Hi
thanks for your wonderful effort.
my main problem is when I connect to L2TP/ipsec on Android download speed is very low but upload speed is OK. the server has a DL speed of 607 Mbps and UL 250 Mbps and the client has DL 25 Mbps and UL 15 Mbps but when connected to vpn client's DL speed seems to be limited to 1.2 Mbps while UL speed is up to 13 Mbps.
I have also a side issues that I don't really care about but it would be great if that could be solved as well :
windows 10 1803 won't connect to L2TP despite the reg fix and everything I could find online.

@hwdsl2
Copy link
Owner

hwdsl2 commented Sep 9, 2018

@Pouriyahe Hello! VPNs (such as L2TP/IPsec) have overhead due to packet encapsulation and encryption/decryption. It is normal to have lower throughput compare to connections without VPN. The alternative connection mode, IPsec/XAuth [1], has lower overhead compared to L2TP/IPsec, which you can try to see if the throughput improves.

Regarding Windows 10 1803, can you try appending ,aes256-sha2_256 to the end of the phase2alg line in /etc/ipsec.conf, and restart the IPsec service? Let us know if that works. See [2] for more info.

[1] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients-xauth.md
[2] hwdsl2/docker-ipsec-vpn-server#84 (comment)

@letoams
Copy link

letoams commented Sep 9, 2018 via email

@Pouriyahe
Copy link
Author

@hwdsl2 Thanks for responding.
trying IPsec/XAuth on Android does not help since it says "connected" but there seems to be no internet connection wahtsoever.
About win 10 , appending ,aes256-sha2_256 to the end of the phase2alg line in /etc/ipsec.conf and restarting did not solve the problem but the error message has now changed to : "the L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer"
@letoams
TCPMSS seems to be improving the download speed but it didn't solve the whole issue.
thanks again.

@hwdsl2
Copy link
Owner

hwdsl2 commented Sep 11, 2018

@Pouriyahe To fix the Android IPsec/XAuth issue (and possibly also the Windows 10 issue), change sha2-truncbug=yes to sha2-truncbug=no in /etc/ipsec.conf, then run service ipsec restart. Refer to [1].

Windows error 789 may be caused by incorrect IPsec pre-shared key (PSK) (mismatched with the server) in your VPN connection settings. Please double check.

Let us know if this fix works.

[1] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#android-6-and-above

@letoams
Copy link

letoams commented Sep 11, 2018 via email

@letoams
Copy link

letoams commented Sep 12, 2018 via email

@Pouriyahe
Copy link
Author

So,
changing the ipsec config file (truncbug=no) solved the Xauth connection problem on android and the speed test results have improved by around 400 percent. The DL speed is still less than a connection w/o VPN but that's to be expected and the Xauth speed is much more reasonable. So huge thanks for that.
Also windows is now connecting to the L2TP but it cannot connect via shrewsoft vpn client app that says : " negotiation timeout occurred ... "
BUT
there is some issue
I can no longer connect to L2TP with my phone through my wifi router ( was working before ) and it doesn't work on the windows(Ethernet from the same router) or with the Xauth .
I can connect through other WiFi networks or my phones data connection.
You guys are really such great people I don;t know how to say how much I appreciate this.
Thank you very much

@hwdsl2
Copy link
Owner

hwdsl2 commented Sep 13, 2018

@Pouriyahe You’re welcome! Glad to hear that the Android IPsec/XAuth worked and the throughput improved.

The issue you mentioned where you can no longer connect with L2TP through your router, is because you first used XAuth mode on your phone to connect, and because many Android clients do not properly delete the IPsec SA on disconnect, the VPN server “remembers” the XAuth mode from that IP address, and will not allow L2TP clients to connect from that same IP.

To fix it, simply run “service ipsec restart” on your VPN server, or alternatively, reboot your server. This issue could also resolve itself after a few minutes without restarting.

The Shrew Soft VPN client is outdated and may not work on Windows 10 (not officially supported).

@hwdsl2 hwdsl2 closed this as completed Sep 13, 2018
hwdsl2 added a commit that referenced this issue Sep 14, 2018
- Add troubleshooting sections for Windows 10 version 1803 and macOS
  IPsec/L2TP mode "Send all traffic"
- Cleanup
- Ref: #442 #376
hwdsl2 added a commit that referenced this issue Sep 14, 2018
- Add troubleshooting sections for Windows 10 version 1803 and macOS
  IPsec/L2TP mode "Send all traffic"
- Cleanup
- Ref: #442 #376
nebulabox pushed a commit to nebulabox/setup-ipsec-vpn that referenced this issue Feb 12, 2019
- Add troubleshooting sections for Windows 10 version 1803 and macOS
  IPsec/L2TP mode "Send all traffic"
- Cleanup
- Ref: hwdsl2#442 hwdsl2#376
andyvip pushed a commit to andyvip/setup-ipsec-vpn that referenced this issue Oct 28, 2019
- Add troubleshooting sections for Windows 10 version 1803 and macOS
  IPsec/L2TP mode "Send all traffic"
- Cleanup
- Ref: hwdsl2#442 hwdsl2#376
denmojo pushed a commit to denmojo/setup-ipsec-vpn that referenced this issue Sep 23, 2020
- Add troubleshooting sections for Windows 10 version 1803 and macOS
  IPsec/L2TP mode "Send all traffic"
- Cleanup
- Ref: hwdsl2#442 hwdsl2#376
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants