WSL: While connected to VPN the curl command hangs up
OK: From our office and from home remotely, we can use the VPN connection, curl succeeds. OK: While visiting our customer’s office, without using the VPN connection, curl also succeeds. FAIL: While visiting our customer’s office, when using the VPN connection, curl hangs as follows:
$ curl ifconfig.co; curl -vvv https://testlink.limelightbox.com
198.199.107.195
* Rebuilt URL to: https://testlink.limelightbox.com/
* Trying 52.39.78.238...
* TCP_NODELAY set
* Connected to testlink.limelightbox.com (52.39.78.238) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
Above simply hangs.
Can someone assist with advice
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 36 (3 by maintainers)
Commits related to this issue
- Use proxy to Windows on WSL See https://github.com/microsoft/WSL/issues/4517 for context — committed to giggio/bashscripts by giggio 7 years ago
May this could be a fix for you: Set MTU to the value of the VPN interface:
sudo ifconfig eth0 mtu 1350You could type in cmd.exe
netsh interface ipv4 show subinterfacesand look at the leftmost column MTU.It seems like I found out in packet dumps the ssl handshake is fragmented and gets dropped for some reason.
I have same issue as @giggio except that my curl works for public addresses such as google.com. Any internal resource inside company private network I get the same behavior as @giggio. Windows side works fine. Check Point Mobile VPN client opened in Windows that to my knowledge should route ALL traffic via company network.
I made the feedback as @craigloewen-msft instructed and it can be found here. Hope it helps.
I’m having a similar issue with our VPN.
Git and SSH both hang over the VPN from WSL but both work just fine from within Windows.
Windows version: Microsoft Windows [Version 10.0.18990.1]
The VPN client is Shrew Soft standard edition version 2.2.2.
By the way, I’ve been using this VPN client version with a VMware Linux VM for years just fine, NATing through windows.
This works for me too.
my kernel
I make it permanent by add this line to
/etc/wsl.confIt’s a manual .msi and download from here. I’m currently on
@giggio Here’s my setup:
1. Setup a HTTP or SOCKS5 proxy in Windows-land
I’m using cow, as I already have it installed (you can use whatever proxy software works). My cow config
rc.txtis as below:It does nothing other than proxying traffic from port 7777 to Windows network.
2. Setup curl/wget/git in WSL2 to use the Windows proxy above
http_proxyandhttps_proxyenvironment variable should be enough. e.g.export http_proxy=http://${your windows local IP}:7777~/.ssh/config:replace
git.yourcompany.comwith your company’s Gitlab host, and replace192.168.2.171with your Windows machine’s local IP (see ipconfig.exe) and it’s done.I’m having the exact same problem, I can’t work when connected to my company network. The network does not seem to work in some scenarios. DNS resolution works. Curl does not work, either with http or https.
This is what I get on http:
On https the log is the same as from this issue, but I’m on TLS 1.3:
I’ll report the logs as explained earlier, as well.
I’m on Windows Version 10.0.19041.207, WSL 2, Ubuntu 18.10 (but it also repros on Suse).
curl.exe works on Windows normally.
curl works when the vpn is not being used.