I am running a console app in Windows 10 which has a self-hosted HTTPS server listening on port 44340. It's an ASP.NET Core website (Kestrel) and its perfectly browsable on the Windows side.
I cannot reach this port from within a Windows Subsystem for Linux 2 (WSL2) console running Ubuntu 18.04, testing with curl
.
I've tried adding a Windows Firewall rule for that port but it doesn't seem to work.
I've tried via localhost
, as well as the two IPs I can see for my machine. One is the real NIC using DHCP and the other is a vEthernet adapter for WSL with a 172.31
address.
Here's what I did.
xyz
pointing at my physical NIC IP.xyz
.xyz
xyz
.curl https://xyz:44340
and observed the failure to validate my self-signed cert.That confirms TCP is working, so I'm off to bed. Essentially the blockers were:
See guidance here
https://docs.microsoft.com/en-us/windows/wsl/networking#accessing-windows-networking-apps-from-linux-host-ip
You will also need to allow inbound connections to that port in the host. (Through a firewall rule).