mullvad / mullvadvpn-app

The Mullvad VPN client app for desktop and mobile
https://mullvad.net/
GNU General Public License v3.0
4.93k stars 335 forks source link

No Internet in Waydroid or VirtManager #5020

Closed secretmango closed 1 year ago

secretmango commented 1 year ago

I have reset my systemd-resolved settings to vanilla, and still when connected to Mullvad VPN my VMs and Waydroid have no internet. When I disconnect the App I suddenly have internet again.

OS: Fedora Linux 38.20230818.0 (Kinoite)
KDE Plasma: 5.27.6
KDE Frameworks: 5.108.0
Qt: 5.15.10
Kernel: 6.4.10-200.fc38.x86_64
Compositor: wayland

I use a Wireguard tunnel and use Mullvads DNS adblocking etc. What do I have to do to have internet in the containers too? Waydroid uses Android libraries to run Android apps in containers (not an emulator). Do I have to change their DNS servers?

eightfiftytwo commented 1 year ago

Try turning on local network sharing.

secretmango commented 1 year ago

@eightfiftytwo thanks that solved it! I am confused now, isnt that also the setting to connect to other devices in the virtual local network, e.g. other of your devices on the same wireguard router?

eightfiftytwo commented 1 year ago

Not sure what you mean by virtual local network and wireguard router, but here's what I figured out when I had the same problem.

By default, mullvad captures all traffic and sends them through the VPN tunnel, even traffic intended for private IP ranges like 192.168.0.0/16. So you can't reach devices on your LAN on 192.168.1.0/24.

Turning on 'local network sharing' lets you access your LAN by allowing traffic to LAN to bypass the tunnel. Unfortunately, the name is a bit misleading. Because what it actually does is allow traffic to all private IP ranges like 192.168.0.0/16 to bypass the tunnel. Since virt-manager runs its own subnet at 192.168.122.0/24, you need this option to reach the VM. Not sure what the networking situation is for waydroid, but it seems similar, just with 192.168.250.0/24.

See also this comment.

I'm a networking noob so don't take this as gospel

secretmango commented 1 year ago

good explanation for a noob! Ticking this option fixed it

Schweeeeeeeeeeeeeeee commented 6 months ago

It only kinda works for me, I don't get a notification that I'm offline but everything ages to load and then just fails

secretmango commented 5 months ago

update: after upgrading to Fedora 40 now it suddenly doesnt work anymore. Running mullvad-exclude virt-manager it works normally.

I have local network sharing enabled.

Is there any port I need to open to make it work?