Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPN issue #6788

Open
26zl opened this issue Nov 6, 2024 · 0 comments
Open

VPN issue #6788

26zl opened this issue Nov 6, 2024 · 0 comments

Comments

@26zl
Copy link

26zl commented Nov 6, 2024

Hi!

I’m using a Mac Mini M2 (latest os) with Mullvad VPN (latest), and I’m running a Kali Linux VM through UTM (latest version). The objective is to route all traffic from the VM through the host’s VPN (Mullvad), ensuring that my real IP do not get exposed. However, I’ve encountered issues with this setup:

  1. Only “Bridged” mode provides internet access, but it bypasses the VPN, showing my real IP in the VM.

  2. I’ve tried all available network modes and configurations in UTM with no success in routing the VM traffic through Mullvad on the host i do not get any internet at all with these modes enabled with Mullvad on.

  3. I’ve tested multiple Linux distributions, and the issue persists across them all, so not only kali.

Network Modes

Shared Network (NAT):
No connection at all

Bridged Mode:
This mode allowed the VM to access the internet, but it bypassed the VPN entirely, showing my real IP in the VM while the Mac itself was connected through Mullvad VPN.

Host Only:
Blocks internet access for the VM, so it wasn’t suitable for our purposes.

Emulated VLAN:
I've seen this being the problem solver for most people with the same problem, but it did not work for me unfortunately.

Other settings:

Virtio Network Card:
I tested both virtio-net-pci and virtio-net-device as network card options. Both configurations yielded the same result, with no difference in routing behavior.

Mullvad Settings:
Enabled in Mullvad’s settings. This option should, in theory, allow traffic from local network sources (such as the VM) to route through the VPN. It’s worth mentioning that on Windows, this setting must be enabled to allow similar setups, so it was enabled here on macOS as well to ensure compatibility with what I’m trying to achieve.

Firewall: MacOS firewall is enabled, but UTM and Mullvad VPN are allowed through, so they should not be blocked.

Isolate Guest from Host:
I enabled and disabled Isolate Guest from Host to test if it would enforce routing through the VPN by preventing direct communication between the VM and the host. However, this setting made no difference in the routing behavior for the VM.

Manual Static Routes:
I attempted to add a route within the VM to direct traffic through the host’s VPN interface (utun0). This resulted in the error “no such device”, since utun0 exists only on the host and is not visible within the VM.

I love UTM and genuinely appreciate the software you've built. I’ve had nothing but positive experiences with the program otherwise, and I’m hopeful someone might be able to help me resolve this specific issue with VM routing on macOS. Any advice or guidance would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant