QEMU/KVM VM Loses Network Access When "Local Network Sharing" is Disabled in Mullvad VPN

I’m running QEMU/KVM on Fedora Silverblue with Mullvad VPN, and I’m running into a network issue.

When “Local Network Sharing” is disabled in Mullvad, my VMs lose all network access. But as soon as I enable that setting, they regain connectivity.

I want my VMs to have network access without enabling local network sharing, while ensuring that all their traffic is routed through the VPN. The reason I want local network sharing disabled is to prevent other devices on the network from seeing my computer.

I previously used VirtualBox on Linux Mint, and this was never an issue. That said, I really prefer QEMU/KVM over VirtualBox—it’s so much better, and I’m really enjoying using it. I just want to figure out how to get my networking configured properly.

I’ve also tried setting up a bridge connection by going into the virtual machine settings, selecting network options, choosing bridge device, and setting the device name to virbr0, but that didn’t resolve the issue.

I’ll admit, I don’t have a lot of experience with networking or VM networking, so I’m not sure if what I’m trying to do is even possible on QEMU/KVM. If it isn’t, I’d really appreciate it if someone could explain why that’s the case. Any insights or guidance would be super helpful!

Apparently Mullvad VPN adds some firewall rules that break traffic forwarding.

Perhaps there’s a way to prevent the VPN messing with the firewall, but they don’t offer any free plan, so it’s problematic to test and investigate.

As a workaround, you can try importing the VPN profile to NetworkManager and avoid using their client app.

On the other hand, a shared host bridge can be configured like this:
How to make a Virtual Machine present itself to my home network as if it were another physical computer - #7 by vgaetera

1 Like