-   Linux - General (
-   -   Unable to connect Windows host with guest ubuntu via network (

pawan613 11-25-2011 07:38 AM

Unable to connect Windows host with guest ubuntu via network
Hello all.
I saw few posts of this type, but did find any help.
Well, I'm using Windows XP as my native OS and I have installed Ubuntu 10.10 on VirtualBox.
My windows ip is but my linux IP is
I'm unable to ping from either side.
I need to create samba shares in linux and access those in Windows, but network is not getting connected.
In VirtualBox my network is attached to NAT and in advanced "Intel PRO/1000 MT Desktop" is selected.
Any help someone can provide?
Thanks in advance.

camorri 11-25-2011 08:20 AM

You need to install Guest Additions. I run a linux host and XP guest. From the guest side, I can copy files in both directions.

I do not know how the routing between the two systems works, I can ping between the two, my host is a 192.168.x.y address, and XP ( guest is ) The NAT setup you described is the way mine is.

Once you install Guest Additions, you should be able to set up what will be shared between guest and host. Its in the V-box config.

Samba is not so easy to set up. Have a look at the the tutorials on this board, in the Tuts-Networking section.

pawan613 11-25-2011 09:41 AM

Hi camorri,
I have already installed guest additions. Still it's not working for me.
Any other suggestion?

camorri 11-25-2011 10:02 AM

When you are testing with the ping command, are you on the host side or the guest side?

I can ping the host from the guest, but not the guest from the host. Sharing as far as I know, only works from the guest, to the host. I can read and write both directions, but only on the guest.

Since you have Linux as your guest, you will have to set up samba first.

The guest to host has to work first. If you open a command prompt in the guest, ( linux ) and run the command 'netstat -r' ( without the quotes ) do you have a default route set? On my guest I see this:


This may be a case in linux you have to set things up. I have never set up a linux guest, since its my main OS.

Here is the full output of netstat -r on my guest:


Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 15 d2 8a ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
Active Routes:
Network Destination Netmask Gateway Interface Metric 20 20 20 20 1 20 1
Default Gateway:
Persistent Routes:

Route Table
I bunched the fields up, I had to pipe the output to a file on the guest, and use a share to copy it to my host system, then copy and paste it here.

RedNeck-LQ 11-27-2011 04:06 PM

@ pawan613

Before you start the Guest OS, on the right-hand side click on Network. in the Adapter 1 tab, change the Attached Adapter from nat attached to Bridged Adpapter from the drop down list and then hit OK. This will put your virtual guest in the same network id of your host machine 192.168.x.y

I do this with all my guests OS's and I am able to ping, ssh, samba, copy and run services with no problems. Also if you have firewall(s) make sure to open the ports for them to pass through.

All times are GMT -5. The time now is 03:06 PM.