EN
Windows WSL and VPN - how to connect WSL to windows VPN when windows is connected to VPN?
1 answers
4 points
How can I connect WSL to VPN?
I have windows with working VPN connection.
I would be interested to solution for below VPN's:
- NordVPN
- Cisco AnyConnect
- Some other popular VPN's
1 answer
4 points
Personally I've tested wsl-vpnkit:
This is quite popular and solves the problem.
Below I show some examples.
service status
xxxxxxxxxx
1
wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit status
start service
xxxxxxxxxx
1
wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start
Examples of two above commands:
xxxxxxxxxx
1
// check status:
2
PS C:\Users\john> wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit status
3
Service wsl-vpnkit is not running
4
5
// start serevice:
6
PS C:\Users\john> wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start
7
8
// check status, again:
9
PS C:\Users\john> wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit status
10
Service wsl-vpnkit is running
How to setup? From the github read me of wsl-vpnkit:
Setup
Download the prebuilt file
wsl-vpnkit.tar.gz
from the latest release and import the distro into WSL 2. Running the distro will show a short intro and exit.xxxxxxxxxx
1# PowerShell
2
3wsl --import wsl-vpnkit --version 2 $env:USERPROFILE\wsl-vpnkit wsl-vpnkit.tar.gz
4wsl -d wsl-vpnkit
Start
wsl-vpnkit
from your other WSL 2 distros. Add the command to your.profile
or.bashrc
to startwsl-vpnkit
when you open your WSL terminal.xxxxxxxxxx
1wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start
0 commentsShow commentsAdd comment