Comments (17)
I also experience this same issue. I didn't test all of the versions, but 2.0.0 works. Thanks for checking, I will probably pin to 2.0.4 then for now.
I don't get the same error though.
I get this:
wsl-vpnkit[43207]: /nix/store/kvzzfa5ly1qyw080bhndgr97nf4c4xps-gvproxy-0.7.1/bin/gvproxy-windows.exe is not executable due to WSL interop settings or Windows permissions
But running the script directly from my user with sudo works.
So something with the permissions is different when it runs via systemd since 2.0.5.
from wsl-vpnkit.
I have created a pull-request to resolve my issue as explained in #247. Please have a look at the pull-request : #250
This does the necessary to set the WSL_INTEROP value correct inline in the wsl-vpnkit script.
No need anymore for having an extra script running before the service is started.
And most of all, it is self-healing, so if you have more than one bash-terminals running and you would close the process linked to the WSL-INTEROP-socket, that will be detected and will switch over to another running socket
from wsl-vpnkit.
Just wanted to report that since I have added the following to my .wslconfig
file, all my network issues (with and without connecting to VPN) have been solved. I have removed wsl-vpnkit
since it was not needed anymore.
[wsl2]
networkingMode=mirrored
from wsl-vpnkit.
Seems that WSL versions >= 2.0.0 don't work correctly with this script anymore (systemctl mode).
I feel the change was in 2.0.5
2.0.0-2.0.4 all work with wsl-vpnkit, per my testing
from wsl-vpnkit.
Fixed it using #247 (comment)
from wsl-vpnkit.
is this feature only available on Windows 11?
Yes. This requires Windows 11 version 22H2 or higher (reference).
from wsl-vpnkit.
Seems that WSL versions >= 2.0.0 don't work correctly with this script anymore (systemctl mode).
Some changes have been introduced in the 2.0.0 WSL version related to connectivity and networking, this could be the reason.
Could you try to play with the new experimental-settings introduced and see if any combination / setting fix the systemctl issue?
from wsl-vpnkit.
from wsl-vpnkit.
@dabeck81 the PR doesn't work for me: I tried the following:
I copied the two new files from your PR (wsl-vpnkit
and wsl-vpnkit.service
) to overwrite those in wsl-vpnkit
0.4.1 already installed on my computer. I then repeated the steps to create the systemd
service and verified that the new wsl-vpnkit.service
is in place.
I did a wsl --shutdown
. I get the following error message:
Here is what I get in journalctl
:
$ journalctl -b -u wsl-vpnkit.service
Nov 22 18:08:37 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + TAP_NAME=wsltap
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + CHECK_HOST=example.com
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + DEBUG=0
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + set +x
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + WSL_INTEROP=/run/WSL/7_interop
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + '[' 0 -eq 0 ]
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + set +x
Nov 22 18:08:39 XXXXXX wsl.exe[201]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 1.
Nov 22 18:08:39 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:39 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + TAP_NAME=wsltap
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + CHECK_HOST=example.com
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + DEBUG=0
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + set +x
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + WSL_INTEROP=/run/WSL/27_interop
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + '[' 0 -eq 0 ]
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + set +x
Nov 22 18:08:39 XXXXXX wsl.exe[450]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:40 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 2.
Nov 22 18:08:40 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:40 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + TAP_NAME=wsltap
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + CHECK_HOST=example.com
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + DEBUG=0
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + set +x
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + WSL_INTEROP=/run/WSL/46_interop
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + '[' 0 -eq 0 ]
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + set +x
Nov 22 18:08:40 XXXXXX wsl.exe[451]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:40 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:40 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:40 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 3.
Nov 22 18:08:40 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:40 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + TAP_NAME=wsltap
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + CHECK_HOST=example.com
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + DEBUG=0
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + set +x
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + WSL_INTEROP=/run/WSL/65_interop
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + '[' 0 -eq 0 ]
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + set +x
Nov 22 18:08:41 XXXXXX wsl.exe[452]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 4.
Nov 22 18:08:41 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:41 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + TAP_NAME=wsltap
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + CHECK_HOST=example.com
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + DEBUG=0
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + set +x
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + WSL_INTEROP=/run/WSL/84_interop
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + '[' 0 -eq 0 ]
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + set +x
Nov 22 18:08:41 XXXXXX wsl.exe[455]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 5.
Nov 22 18:08:41 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Start request repeated too quickly.
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:41 XXXXXX systemd[1]: Failed to start wsl-vpnkit.
from wsl-vpnkit.
https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings
add inside "/etc/wsl.conf" :
[interop]
enable = true
from wsl-vpnkit.
https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings
add inside "/etc/wsl.conf" :
[interop] enable = true
I'm still seeing this error on 2.0.14
As an aside - per the release notes 'Disable the 'NoRemoteImages' process mitigation policy since it breaks execution of windows executables' was supposed to resolve the recent issue with wsl-vpnkit - but I'm still having breaking issues.
from wsl-vpnkit.
I'm wondering if my issue is related to a third variable. When I removed it, wsl 2.0.14 and wsl-vpnkit .0.4.1 immediately started working.
from wsl-vpnkit.
The interop enable trick shouldn't be needed since its by default true.
from wsl-vpnkit.
Maybe... My issue since I applied the patch is, as I installed the wsl-vpn-kit in my systemd ubuntu WSL, each time I open a new tab (with Hyper.is) the new tab seems to relaunch the service and breaks any current other tab connected with SSH...
I maybe will have to switch to a dedicated vpn-kit distrib...
from wsl-vpnkit.
Just wanted to report that since I have added the following to my
.wslconfig
file, all my network issues (with and without connecting to VPN) have been solved. I have removedwsl-vpnkit
since it was not needed anymore.[wsl2] networkingMode=mirrored
is this feature only available on Windows 11?
from wsl-vpnkit.
is this feature only available on Windows 11?
Yes. This requires Windows 11 version 22H2 or higher (reference).
Which is still available only in some of Windows Insider channels :(
from wsl-vpnkit.
Having a similar issue - this is my WSL and Windows version:
wsl.exe --version
WSL version: 2.0.9.0
Windows version: 10.0.22631.3007
I tried the networkingMode=mirrored
thing but it didn't work, even though I think I should be on a high enough Windows 11 version.
This is the output I get from journalctl -b -u wsl-vpnkit.service
:
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: Started wsl-vpnkit.
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + VPNKIT_GATEWAY_IP=192.168.127.1
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + VPNKIT_HOST_IP=192.168.127.254
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + VPNKIT_LOCAL_IP=192.168.127.2
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + VMEXEC_PATH=/app/wsl-vm
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + TAP_NAME=wsltap
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + CHECK_HOST=example.com
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + CHECK_DNS=1.1.1.1
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + DEBUG=0
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + set +x
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: cat: can't open '/etc/resolv.conf': No such file or directory
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + WSL2_TAP_NAME=eth0
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + WSL2_GATEWAY_IP=
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + '[' 0 -eq 0 ]
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + set +x
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: resolv.conf has been modified without setting generateResolvConf
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: cat: can't open '/etc/resolv.conf': No such file or directory
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 5.
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: Stopped wsl-vpnkit.
Interestingly when I look for this file, it seems to redirect / be linked to another file:
ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 20 Feb 5 11:53 /etc/resolv.conf -> /mnt/wsl/resolv.conf
But then that file doesn't exist ๐:
ls -al /mnt/wsl/resolv.conf
ls: cannot access '/mnt/wsl/resolv.conf': No such file or directory
from wsl-vpnkit.
Related Issues (20)
- Patch for 0.4.1's systemd service stopped working
- Intermittently losing network connectivity - "Exception 0xc0000006" and "cannot read size from socket: EOF"
- resolution of host.internal variable HOT 1
- Systemd setup prevents wsl.exe from running
- How does WSL2 2.0.0 interact with wsl-vpnkit? HOT 17
- open capture.pcap: Access is denied HOT 1
- Lost access to WSL service from Windows when connected to VPN
- wsl-vpnkit has a undocumented effect on a distro once systemd is enabled, full uninstall info needed
- bind: An attempt was made to access a socket in a way forbidden by its access permissions.
- Any known issues with wsl-vpnkit and wsl 2.0.5? HOT 30
- Resolving interop-issue while running wsl-vpnkit as a systemd-service in own wsl-distro HOT 12
- wsl-vpnkit and wsl 2.0.14 HOT 4
- WSL2 September 2023 allows for Mirrored Networking Mode HOT 3
- Subnet 192.168.100.0/24 ping responds always when wsl-vpnkit distro is running
- Reverse lookup does not work
- ping fail error
- Program stucks while checking internet connection HOT 1
- README update.
- "too many open files" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wsl-vpnkit.