WSL: Cannot connect to HTTPS
Your Windows build number: 10.0.17763.195 Linux kernel version: 4.4.0-17763-Microsoft #194-Microsoft Mon Dec 03 17:58:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux Distribution: Ubuntu 18.04
What you’re doing and what’s happening: Since Windows 10 October 2018 Update has been installed, WSL is unable to establish SSL/TLS connections. By instance, if I try a HTTPS URL with curl:
user@HOSTNAME:~$ curl --verbose https://packages.microsoft.com/ubuntu/18.04/prod
* Trying 13.80.10.205...
* TCP_NODELAY set
* Connected to packages.microsoft.com (13.80.10.205) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to packages.microsoft.com:443
* stopped the pause stream!
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to packages.microsoft.com:443
And this is the same with wget or apt update, even when Windows’ firewall and antivirus have been disabled. But there is no problem with HTTP requests.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 10
- Comments: 15
Thank you again for your help.
You are right, the culprit is Kaspersky. If you pause its protection, HTTPS still fails. But you do not need to fully uninstall it. You can simply exit it before running some HTTPS requests in WSL and start it again after.
You can also modify some Network settings in Settings > Additional > Network. There are 3 solutions:
I guess the 2 first ones can be a security issue… But latest one seems to be a good workaround.
Same issue for me.
Windows version:
WSL distros
Debian kernel version:
I don’t have any antiviruses, firewall is disabled.
I only used Windows Defender, and my use of HTTPS apt update sources is normal, only curl, wget is not correct (git HTTPS is normal).Is there a solution?Is it defender?
@gradinarot What fixed it for me is using Ubuntu 18 instead of 20.
Same issue ! This post is several months old, is this still broken ? It’s like one of the most important things for a dev machine to have working…
Windows
WSL
Ubuntu
Has anyone managed to resolve this?