microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.37k stars 816 forks source link

Unable to access VPN from WSL2 when networking mode set to `mirrored` #11072

Closed AlexandreDenis closed 2 months ago

AlexandreDenis commented 8 months ago

Windows Version

Microsoft Windows [version 10.0.22631.3007]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu-20.04

Other Software

No response

Repro Steps

  1. Connect to VPN on Windows
  2. Set networking mode to mirrored in .wslconfig file on Windows
  3. Relaunch WSL
  4. From WSL, try to ping any private IP address of the VPN. It does not work anymore while it was working with default networking mode

Expected Behavior

I would have expected to be able to access to VPN connection from WSL

Actual Behavior

Ping command to any private IP address of the VPN fails

Diagnostic Logs

No response

github-actions[bot] commented 8 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Tofu-AKI commented 8 months ago

though don't know why, trying to manually install it really worked. the conclusion I came to after trying for several days.

tomadimitrie commented 7 months ago

Same issue here. Any workaround yet?

@Tofu-AKI sorry, but I don't understand what you mean. How did you solve it?

Edit: So if anyone is using OpenVPN, apparently it's known issue in #10879. Only the official OpenVPN clients (both versions 2 and 3) are affected. Other clients such as Viscosity work great

rayae commented 7 months ago

Thanks to @tomadimitrie, I tried Viscosity and it worked well.

yakuninmax commented 6 months ago

I'm using the latest version of WSL, mirroring mode. OpenVPN Connect 3 works with ipv6, but does not work with ipv4, Viscosity works with ipv4, but does not work with ipv6 :)

dangaogit commented 2 months ago

Hello, is there any progress on this issue at the moment?

CatalinFetoiu commented 2 months ago

hi, can you please collect logs using instructions below?

please do the following: Run https://github.com/microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1 disconnect VPN run "wsl --shutdown" start WSL connect VPN reproduce the issue stop collect-networking-logs.ps1 and share the generated zip

please also refer to https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues before running the script - you need to install tcpdump and WPR.

what is the name of the VPN product you are using?

dangaogit commented 2 months ago

@CatalinFetoiu use OpenVPN Connect 3.4.4 The collected networking logs are too large to upload.

CatalinFetoiu commented 2 months ago

@dangaogit thanks for following up unfortunately at the moment openvpn is known to be incompatible with mirrored mode networking. this is tracked in #10879

/dupe #10879

microsoft-github-policy-service[bot] commented 2 months ago

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!