Network Error when using OpenVPN
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [Version 10.0.26100.4351]
### WSL Version
2.5.9.0
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
6.6.87.2-1
### Distro Version
Ubuntu 24.04
### Other Software
OpenVPN 2.6.13-l001 amd64
ver 2.6.1301
### Repro Steps
1. Boot and log in to Windows, which have OpenVPN installed
2. Launch wsl by running `wsl.exe`
3. Execute in wsl `ping google.com` then it says `Network unreachable`
4. Execute `ifconfig`:
```
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 624 bytes 74370 (74.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 624 bytes 74370 (74.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
loopback0: flags=4163 mtu 1500
ether 00:15:5d:57:9f:5a txqueuelen 1000 (Ethernet)
RX packets 319 bytes 23514 (23.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 294 bytes 22088 (22.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```
if I execute `wsl.exe --shutdown` and retry, it works well,
Or I just turn on OpenVPN:
Everything works well
```
eth3: flags=4163 mtu 1500
inet 10.8.0.2 netmask 255.255.255.0 broadcast 10.8.0.255
inet6 fddd:1194:1194:1194::2 prefixlen 128 scopeid 0x0
inet6 fe80::e2b3:f8ff:5684:9127 prefixlen 64 scopeid 0x20
ether 00:15:5d:5a:6f:f5 txqueuelen 1000 (Ethernet)
RX packets 33 bytes 1926 (1.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 87 bytes 7726 (7.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```
### Expected Behavior
the network works well and I needn't reboot wsl, and I needn't turn on OpenVPN either
### Actual Behavior
```
(base) he@Home-Computer:~$ ping google.com
ping: connect: Network is unreachable
(base) he@Home-Computer:~$ ifconfig
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 624 bytes 74370 (74.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 624 bytes 74370 (74.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
loopback0: flags=4163 mtu 1500
ether 00:15:5d:57:9f:5a txqueuelen 1000 (Ethernet)
RX packets 319 bytes 23514 (23.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 294 bytes 22088 (22.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```
### Diagnostic Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with WSL 2.5.9.0, kernel 6.6.87.2-1, Ubuntu 24.04, and OpenVPN 2.6.13, then compare the network interfaces and connectivity before and after `wsl.exe --shutdown` or enabling OpenVPN. Done means WSL starts with working network access without requiring either workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100