Page 1 of 1

Sharing Internet Connection from guest

Posted: 18. Sep 2010, 07:42
by SIMONSEZ
I've installed the latest VBox (Windows7) in my OS X 10.6.4. Everything works perfectly for now, but i have difficulty to share my internet connection from guest (win7) to host (OS X). My internet connection software only run in windows OS (using putty, winPcap, etc). Anyone can help me? Thank you very much...

Re: Sharing Internet Connection from guest

Posted: 18. Sep 2010, 23:52
by Sasquatch
Add a NIC to the VM if you haven't attached one already and set it to Host-Only. In the general VB settings, DISABLE the DHCP service for the host-only interface and configure it with the following IP, the last number can be anything between 2 and 254:
IP: 192.168.0.2
Mask: 255.255.255.0

That is everything you can configure there, but your Host needs a gateway too, and that will be 192.168.0.1. DNS servers can be whatever the Host gets, but you can also use the OpenDNS servers.

In the Guest, right click on the interface that provides internet and click on Properties. Go to the Advanced tab and share the connection. This should set the other interface with the IP of 192.168.0.1 and enable a DHCP server on it. It's a bit of a shame that it can't be set on the Host side to use DHCP, but you can do that manually. Using the DHCP option means that the above steps to set a static IP are not needed, they will be overwritten by DHCP. You have to run the dhcp client from a terminal in order to get the complete configuration for use on the Host.

Hope it makes sense. Ask if you don't understand something.

Re: Sharing Internet Connection from guest

Posted: 19. Sep 2010, 10:13
by SIMONSEZ
Thanks for replay,
I know nothing about networking, i hope i did what you told me, but still no luck. These are the sreenshoots of my configuration, i hope you can find what i should do.
Thank you Sasquatch.
Image
Image
Image
Image

Re: Sharing Internet Connection from guest

Posted: 19. Sep 2010, 13:53
by Sasquatch
Ok, it looks like your physical interface works too. That means that you can share the internet connection with the first adapter of the VM, Local Area Connection. The rest of the network will be able to get an IP from the VM too if there isn't another DHCP server available (like a router).

The Host-Only adapter can only be configured from within VirtualBox settings, or the Terminal. It does not show up in the network manager on Mac OS. I was using this adapter in my instructions, because the physical interface isn't always connected.