Host-only routing issues
Posted: 22. Jun 2016, 09:32
Hi.
My host is a Debian server connected to the public network, to my LAN (just a single cable between two NICs), and running a wireless AP. Additionally, it runs an OpenVPN server with a few clients. My guests are a couple Debian VMs.
I want the guests to be able to listen for and make connections to my LAN and the VPN.
Bridging the virtual NICs to the LAN NIC does everything I want, even the host DHCP works. The problem is that the virtual NICs replicate the state of the physical NIC, so if my PC at the other end of the cable is offline, all of the VMs disconnect. Ideally, I would like something like this; I would like for the network to behave as if the VMs, the server, and my PC were all connected to the same switch.
Since I couldn't figure out how to do that, my idea then was to use the VMs with host-only networking and add the corresponding routing rules to the server. My understanding is that this behaves like adding another NIC to the host and connecting all the VMs to a virtual switch. I can't get this to work at all.
My host has several addresses for my networks: 10.x.0.1, with x depending on the specific network. vboxnet0 is configured as 10.3.0.1. Pinging from the guest to 10.3.0.1 works fine, but I can't reach it by any other address, nor can I reach any other node. Ping returns "network is unreachable" immediately. I'm guessing this means that the guest is not using the host as a gateway, so it's not even attempting to send the ping request. However, I don't have any way to configure that in the DHCP options dialog for vboxnet0.
Any ideas?
Thanks.
My host is a Debian server connected to the public network, to my LAN (just a single cable between two NICs), and running a wireless AP. Additionally, it runs an OpenVPN server with a few clients. My guests are a couple Debian VMs.
I want the guests to be able to listen for and make connections to my LAN and the VPN.
Bridging the virtual NICs to the LAN NIC does everything I want, even the host DHCP works. The problem is that the virtual NICs replicate the state of the physical NIC, so if my PC at the other end of the cable is offline, all of the VMs disconnect. Ideally, I would like something like this; I would like for the network to behave as if the VMs, the server, and my PC were all connected to the same switch.
Since I couldn't figure out how to do that, my idea then was to use the VMs with host-only networking and add the corresponding routing rules to the server. My understanding is that this behaves like adding another NIC to the host and connecting all the VMs to a virtual switch. I can't get this to work at all.
My host has several addresses for my networks: 10.x.0.1, with x depending on the specific network. vboxnet0 is configured as 10.3.0.1. Pinging from the guest to 10.3.0.1 works fine, but I can't reach it by any other address, nor can I reach any other node. Ping returns "network is unreachable" immediately. I'm guessing this means that the guest is not using the host as a gateway, so it's not even attempting to send the ping request. However, I don't have any way to configure that in the DHCP options dialog for vboxnet0.
Any ideas?
Thanks.