How To Share Your Internet Connection on VirtualBox: Ubuntu Guest on a Windows XP Host

This was very frustrating for me. Really frustrating. I searched on different fora but nothing worked.

First, you need to have some sort of benchmark. For me, it was being able to connect to the Speedtouch modem (Gateway). If you can’t even connect to the modem, there is a problem.

To know the IP address of your gateway on Windows, execute a “tracert google.com” in the command prompt, and it will be the first IP on the list. Or “ipconfig /all” and search for it. Most likely 192.168.1.254.

Here is the configuration which worked for me.

On the left panel of VirtualBox, click on “Settings”. Then “Network”.

You will find a drop box called “Attached to”, chose “Bridged Adapter”..

Just below, you will find “Name”. For me, it was “Intel(R) PRO/100 VE Network Connection”. Chose “Allow All” in “Promiscuous mode” and check “Cable connected”. And then OK.

It doesn’t matter if your guest box is running or not. If it’s not, launch it. If it is, go to the upper right corner of your screen, you will find two arrows.

Click on that icon, and then click on “Connection Information”.

Do it again and click on “Edit Connections”.

Click on whatever connection is offering itself to you, usually it is “Auto  Ethernet” or “Wired Connection 1” or “eth0”. Double-click on it, or click on it, and then click on “Edit”.

Click on the “IPv4 Settings” tab.

In “Method”, chose “Manual” instead of “Automatic (DHCP)”

In “Netmask”, enter “255.255.255.0”. (Without the quotes)

In “Address”, chose an IP address. For example “192.168.1.25” (Without the quotes).

In the “DNS servers” tab, you will enter a list of IP addresses separated by commas. For example, you can enter 208.67.222.222,208.67.220.220  (Which are two of the OpenDNS IP addresses). You can add more if you wish. I added two others that are proper to my ISP. Don’t forget to separate IPs with commas.

You will have something like this

Click on “Save” and close the other window. Click on the two arrows and then click on the name of your connection. This should disconnect you and reconnect you.

You should be done. Open a browser and try Google.com. If it doesn’t work, try your Gateway’s IP address. If this doesn’t work, you probably got it wrong or your cable is disconencted OR you can go to VirtualBox, click “File” then “Preferences”, “Network” and tinker with the parameters there.

If there’s still a problem, feel free to comment here and we can work things out.

Advertisements

4 thoughts on “How To Share Your Internet Connection on VirtualBox: Ubuntu Guest on a Windows XP Host

  1. haiku says:

    i’m able to do ping succesfully to my gateway following this instructions, but, i can’t do ping to google by example. i’m runngin ubuntu 12.04 in windows 7

  2. Thurinqwethil says:

    I’m having a same problem and I double and triple checked the settings. I still can’t connect to internet – Ubuntu 12.04 in Windows 7.

  3. mike says:

    hey i’m trying to share my internet connect from guest using ubuntu, to share the internet with host, win vista, it works with host sharing connection to the guest, but cant get it to work the other way around, can someone help me with that?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s