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

Unable to use VPN routes from within WSL 2 #7315

Closed
1 of 2 tasks
bib-gourmand opened this issue Aug 16, 2021 · 7 comments
Closed
1 of 2 tasks

Unable to use VPN routes from within WSL 2 #7315

bib-gourmand opened this issue Aug 16, 2021 · 7 comments
Labels

Comments

@bib-gourmand
Copy link

bib-gourmand commented Aug 16, 2021

Windows Build Number

10.0.19043.1165

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.16.3

Distro Version

Ubuntu 18.04

Other Software

No response

Repro Steps

  1. Connect to corporate VPN network via Windows 10 VPN connection.
  2. From within WSL 2: either ping corporate IP address or trying to ssh into it.

Expected Behavior

Expecting 0% packet loss for ping and a working ssh connection to corporate VPN servers from within WSL 2.

Actual Behavior

Experiencing 95-100% packet loss for ping and no connection via ssh. (While same commands within cmd.exe (and other software from within Windows that connect to corporate IP addresses) work flawlessly.)

root@DESKTOP-XXX1234:~# ping XX.X.X.XX
PING XX.X.X.XX (XX.X.X.XX) 56(84) bytes of data.
64 bytes from XX.X.X.XX: icmp_seq=34 ttl=61 time=89.4 ms
64 bytes from XX.X.X.XX: icmp_seq=40 ttl=61 time=93.2 ms
^C
--- XX.X.X.XX ping statistics ---
47 packets transmitted, 2 received, 95% packet loss, time 47840ms

Diagnostic Logs

No response

@ecalcutin
Copy link

Probably duplicate of #7254

@iroperto1
Copy link

I have the same issue. When I connect to any connect I can't ping anything, if I disconnect from any connect I can ping or use netutils. I have remove and install WSL without success.

@ecalcutin
Copy link

Try to run the following commands inside your WSL

sudo rm /etc/resolv.conf
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
sudo bash -c 'echo "[network]" > /etc/wsl.conf'
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
sudo chattr +i /etc/resolv.conf

It helped me. I have had same issues while trying to fetch packages from NPM

@iroperto1
Copy link

iroperto1 commented Aug 25, 2021 via email

@bib-gourmand
Copy link
Author

bib-gourmand commented Aug 26, 2021

@ecalcutin @iroperto1 This is not my initial issue. My problem describes that only the VPN network itself is unusable from within WSL2, other outes are. This is not a DNS issue either, hence changing the resolv.conf doesn't mitigate the issue.

This might actually be related: #4915

@bib-gourmand
Copy link
Author

bib-gourmand commented Aug 26, 2021

Actually I solved it. While digging a bit into other issues (e.g. #4201) I changed the VPN connection type from PPTP to SSL. Now everything works!

@justinmchase
Copy link

How do you do change the connection type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants