utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.6k stars 1.33k forks source link

Network configuration when host machine uses VPN #3634

Open iSamBa opened 2 years ago

iSamBa commented 2 years ago

My host machine uses VPN to connect to the company network. I am willing to access a repository in that server from the VM, and I keep getting a time out failure. I am using a Shared Network configuration, and tested also with the bridged one with no success

Configuration

iSamBa commented 2 years ago

The solution is to use Emulated VLAN, that will use port forwarding from the host machine. Found the solution here : https://github.com/utmapp/UTM/issues/3238#issuecomment-959911107

osy commented 2 years ago

https://github.com/machyve/xhyve/issues/84

Seems to be an issue with vmnet. Reopening for a proper fix.

stefan1983 commented 1 year ago

Any update here?

thanosz commented 1 year ago

You should note that a VM created with lima which uses qemu as the backend, does not have this problem and the networks behind the VPN are correctly accessible by the guest VM

rzzldzzl commented 1 year ago

Your VPN might disable IP Forwarding. That is the case with the AWS Client VPN.

My experience is - Guest can access networks as expected (IP Forwarding is enabled) After the hosts connects to the AWS Client VPN, the guest looses access to anything but the host. (IP Forwarding is disabled) Manually enabling IP Forwarding restores connectivity from the guest.

After connecting your VPN (on the host), try enabling IP Forwarding on the host: % sudo sysctl -w net.inet.ip.forwarding=1 net.inet.ip.forwarding: 0 -> 1