KVM: VPN host, guest needs VPN and host access to NFS


diagonal

I'm running an Ubuntu guest in KVM, which in turn runs on an Ubuntu host. The host network goes through a VPN (OpenVPN), providing tun0. I need the guest network to go through the VPN as well, except I need to be able to access the host over the network to get the filesystem mounted via NFS.

host address is 192.168.10.10
router address is 192.168.10.1
tun0 is 10.8.8.16

I don't care if my guests are NATed or bridged, or even if I have to use a second network interface. Does anyone have a possible way to do this?

diagonal

The solution here is to use the default VM settings, and do network NAT. The VM's address will then be in the 192.168.122.0/24 range and the host will be available on 192.168.122.1. As long as the host is connected to the Internet via the VPN, the VM will also be connected via the VPN. While the host is reachable via its local address (192.168.10.10 in this case), the connection must go through the router. In my case, the connection to the router was slow, but the local switch was fast, so using KVM's default 192.168.122.1 host address for NFS transfers was much faster.

Related


KVM: VPN host, guest needs VPN and host access to NFS

diagonal I'm running an Ubuntu guest in KVM, which in turn runs on an Ubuntu host. The host network goes through a VPN (OpenVPN), providing tun0. I need the guest network to go through the VPN as well, except I need to be able to access the host over the netwo

Setup Network on Virtualbox Guest to Access Host VPN

nixgadget I'm trying to get this setup going, but I'm having a lot of trouble. Host OS: Windows 8 64bit Guest OS: CentOS 6.5 64-bit I use the Cisco VPN client on the host to connect to many remote servers that I want to access from the Guest OS. Currently I ha

Access VPN host by name from VirtualBox guest

username I have an Ubuntu guest running under VirtualBox on a W10 host with VPN. I've set up the host-only adapter and the NAT adapter as suggested in other answers here, and everything works fine. The only problem is from the guest that I can't access the hos

Setup Network on Virtualbox Guest to Access Host VPN

nixgadget I'm trying to get this setup going, but I'm having a lot of trouble. Host OS: Windows 8 64bit Guest OS: CentOS 6.5 64-bit I use the Cisco VPN client on the host to connect to many remote servers that I want to access from the Guest OS. Currently I ha

Access VPN host by name from VirtualBox guest

username I have an Ubuntu guest running under VirtualBox on a W10 host with VPN. I've set up the host-only adapter and the NAT adapter as suggested in other answers here, and everything works fine. The only problem is from the guest that I can't access the hos

KVM guest access host USB serial dongle

Sardathrion - Preventing SE Abuse I have a KVM virtual machine running CentOS 7 on a host running Fedora 24. I installed a USB serial dongle (actually an RFID reader, but that should be fine) on that host. The host can see it after running: sudo modprobe usbse

KVM guest access host USB serial dongle

Sardathrion - Preventing SE Abuse I have a KVM virtual machine running CentOS 7 on a host running Fedora 24. I installed a USB serial dongle (actually an RFID reader, but that should be fine) on that host. The host can see it after running: sudo modprobe usbse

Virtualbox host-only guest access via VPN (tun0)

Serena My problem seems to be exactly the same as this one , but the solution didn't work for me. set up: I have an Ubuntu machine acting as a Virtualbox host and OpenVPN server, and several Virtualbox guests within a host-only network vboxnet1 172.16.0.0/24.

How to make VirtualBox guest share host's VPN connection?

Compiler question When I start the VPN on my ubuntu desktop computer which is acting as a router, the connected subnet loses internet connection but is still reachable (LAN). Ideally, I'd like to know how to get connected subnets back to internet access by rou

How to make VirtualBox guest share host's VPN connection?

Compiler question When I start the VPN on my ubuntu desktop computer which is acting as a router, the connected subnet loses internet connection but is still reachable (LAN). Ideally, I'd like to know how to get connected subnets back to internet access by rou

VirtualBox - Guest Ubuntu loses DNS when host is connected to VPN

wrschneider I'm using an Ubuntu guest OS with a NAT of default eth0 in VirtualBox. In addition to using an office VPN at home, it also works fine in the office and at home. DNS queries do not work in Virtualbox guest when host OS (Windows 7) is connected to VP

Share guest VPN connection with host using Hyper-V

Super JMN My company's VPN client doesn't work with Windows 10's latest Insider Builds (HOST), so I thought of using a virtual machine with the VPN client installed (Windows 10 RTM GUEST). Is it possible to make the host PC use the VPN connection in the guest?

How to make VirtualBox guest share host's VPN connection?

Compiler question When I start the VPN on my ubuntu desktop computer which is acting as a router, the connected subnet loses internet connection but is still reachable (LAN). Ideally, I'd like to know how to get connected subnets back to internet access by rou

VirtualBox - Guest Ubuntu loses DNS when host is connected to VPN

wrschneider I'm using an Ubuntu guest OS with a NAT of default eth0 in VirtualBox. In addition to using an office VPN at home, it also works fine in the office and at home. DNS queries do not work in Virtualbox guest when host OS (Windows 7) is connected to VP

Share guest VPN connection with host using Hyper-V

Super JMN My company's VPN client doesn't work with Windows 10's latest Insider Builds (HOST), so I thought of using a virtual machine with the VPN client installed (Windows 10 RTM GUEST). Is it possible to make the host PC use the VPN connection in the guest?

KVM host, add LV to guest

Bafast I have a KVM host with a software RAID 10 array. A software RAID 10 array is a PV on the host, with only one VG. I'm using several LVs ( data storage for KVM guest .imgfiles ) at the host level. Typically, when adding a new disk to the guest, I create a

Host CPU temperature in KVM guest

Yun-Chih Chen I am trying to use to lm_sensorsdetect host CPU temperature in a KVM guest. In the host, after inserting the x86_pkg_temp_thermal kernel module, the sysfs interface /sys/class/thermal/thermal_zone*/tempwill display the required information. Here

KVM host, add LV to guest

Bafast I have a KVM host with a software RAID 10 array. A software RAID 10 array is a PV on the host, with only one VG. I'm using several LVs ( data storage for KVM guest .imgfiles ) at the host level. Typically, when adding a new disk to the guest, I create a

Host CPU temperature in KVM guest

Yun-Chih Chen I am trying to use to lm_sensorsdetect host CPU temperature in a KVM guest. In the host, after inserting the x86_pkg_temp_thermal kernel module, the sysfs interface /sys/class/thermal/thermal_zone*/tempwill display the required information. Here

GCE Linux VM cannot access peer VPN host

secret_cinema: I'm having issues using Google Cloud VPN and tunneling to a peer VPN. The tunnel is up and running, but I can't connect to any point on the peer-to-peer network from my GCE VM. My setup looks like this: A custom VPC network with one internal IP

How to copy paste from host to KVM guest?

Ellopio I have a QEMU/KVM virtual machine created with Virtual Machine Manager. I want to be able to copy text on the host and paste it into the guest and vice versa. How to share clipboard between host and guest? Ellopio The solution is simple. Just install t

Unable to resume KVM guest after rebooting host

Japanese and Chinese I'm running KVM on Linux Mint 17.1, kernel 3.16.0-31-generic. The only guest is a Windows 8.1 VM. I noticed that if the host is restarted while the guest is running, the guest cannot be recovered after the host restarts. Virt-manager just

KVM host networking - guest connection issues

Mike Souler There seems to be a lot of stuff on this topic already, so apologies for adding information, but I haven't had any luck finding anything that can solve my problem. My guests can't ping my default gateway, but my host can ping my default gateway. I

How to copy paste from host to KVM guest?

Ellopio I have a QEMU/KVM virtual machine created with Virtual Machine Manager. I want to be able to copy text on the host and paste it into the guest and vice versa. How to share clipboard between host and guest? Ellopio The solution is simple. Just install t