Host only adapter with guest external access

1

I want to configure my VirtualBox guest(s) (Fedora 13) to have connectivity to Internet through the host(also Fedora 13) with the same IP(for example: guest1 with IP 192.168.50.101 should appear to have hosts IP 10.1.1.2)

So far I got: Host - eth0 with IP 10.1.1.2 with access to internet - vboxnet0 with IP 192.168.50.1

Guest(s) - eth0 static IP 192.168.50.1XX

VirtualBox guest's Network adapter is Host-Only and connected to vboxnet0. I can ping host-guest and vice-versa. My iptables service if stopped.

Serhiy

Posted 2011-04-14T15:17:07.650

Reputation: 121

Answers

1

If you are only looking for Guest->Internet activity, then I would suggest configuring each Virtual Machine to have a single NAT network adapter. All of the traffic originating from the guests will look as though it was coming from the host.

The NAT engine in VirtualBox works similar to how most home-use routers do: It takes the IP address on one side and makes a private network on the other. The guests will not be "visible" from the outside by default, though they will continue to work as the host operating system may change IP configurations (going from a wired ethernet connection to 802.11 wireless for example).

Goyuix

Posted 2011-04-14T15:17:07.650

Reputation: 6 021

I have found some blogs with this method(creating NAT and Host-Only adapters to have host->guest access and guest->host->inet access). But the questions is the host will have it's own external IP in future, will the guests also be visible with that external ip or they will have the IP of general network? – Serhiy – 2011-04-14T19:05:22.667