Skip to contentSkip to conversation

Hyper-V VM can't ping host when Wireguard is started in host

DISCUSSION Loren Hsu 1 participant 1 message Nov 18, 2024

lore
Share & tools
lore

Loren Hsu

author
#0 lore raw

Hi List,
Here is an issue when the Wireguard is running on a Windows 11, the hyper-V VM can't access the host OS.

My laptop is running Windows 11 host OS, it has a hyper-V VM created and Ubuntu 22.04 LTS installed. When Wireguard is started on the Windows 11 host machine, the Ubuntu can't ping the host OS, but it can ping any public IP, like 8.8.8.8.

The VM has only one virtual interface and is connected to a NAT-virtual switch. The NAT-vswitch has a VM-facing IP 192.168.188.1/24, while the IP in the VM is something like 192.168.188.10/24.

Here are some steps that have been taken to clarify this issue:
1. When the Wiregurad is NOT started in the host OS, the Ubuntu can ping the host as well as any public IP.
2. When the Wireguard is started, and capture network traces on the host for the 192.168.188.1 interface, the ping requests are seen coming from the VM, but no reply from the host.
3. from the 'route print' in the host, the 192.168.188.1/32 is there with metrics 271, which is the 2nd lowest metric that is only inferior to the default route, which is 40. But I guess the longest prefix should match first in this case, besides, the route print output looks the same with or without wireguard enabled.

It looks like a firewall issue, since network trace has echo requests from the VM, but it's not clear to me what settings should be changed, since the inbound icmp echo request is allowed already.

Any ideas are welcome.
Thanks,
Loren