Monday, March 30, 2009

How to share internet connection between your Linux Virtual Machine and Windows

I am using the VMWare server 1.0.8 with Windows XP as host and Ubuntu 8.1 as guest

Select your Network interface for type for the Guest OS

Configure the selected card in VMWare setting

Choose the Network IP 192.168.0.0 and click ok

Configure DHCP server for NAT I've set IP range 192.168.1.124 - 192.168.1.254

Open up a terminal ...

..and type 

sudo gedit /etc/network/interfaces

This wil give you a window like the one below.

add the following lines 

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet dhcp

Now we need to setup inetrnet connection sharing in windows

Select the Local Area Connection properties >> Advanced tab >> Check internet connection sharing and select the Vmnet8


Now return t your Ubuntu and run

sudo /etc/init.d/networking restart

Congrats!! Your're done. Now you can browse the web from your guest Virtual Machine