I'm using Vagrant to deploy a large virtual network environment for testing out some applications and network activity. I'm using host-only networking so I can define all the IP addresses in my Vagrantfile, but one of the applications I'm required to use for testing is an external appliance that cannot run as a virtual machine.
So, I'm wondering if it's possible to route traffic incoming to the host machine destined for the host-only LAN. I know this goes against the idea of host-only networking, but I cannot use bridged networking in this case because Vagrant isn't able to set static IP addresses on bridged guest interfaces.
I've tried the following:
- Added route on appliance telling it to use external IP address of VirtualBox host as the gateway for any traffic destined for the host-only LAN.
- Turned on IP forwarding on VirtualBox host
- Added route on VirtualBox host to forward any traffic destined for the host-only LAN to the vboxnet0 interface.
- Tried pinging one of the VirtualBox guests on the host-only LAN from the external appliance — no success.
Any ideas if this is at all possible?
It might be worth noting that I can ping the IP address of the host-only interface on the VirtualBox host (interface vboxnet0) from the external appliance.