Ubuntu VirtualBox VM not connecting to internet in company

Discussions related to using VirtualBox on Windows hosts.
Post Reply
PradeepThalodil
Posts: 1
Joined: 27. Feb 2014, 11:02

Ubuntu VirtualBox VM not connecting to internet in company

Post by PradeepThalodil »

I have gone through a lot of links available on internet to fix the issue of Ubuntu VM unable to access internet, but I found no solution. I use this laptop in my office (not from home). It could be specific to my environment, therefore I am creating this question here. Following are the details.

Problem Statement:

1) Ubuntu VM is unable to connect to internet. (eg. Can’t connect google)

2) Ubuntu VM is able to connect to Host and thus able to browse web sites internal to the company.

I have the following software on my Office Laptop.

1) OS Windows 7 Professional. (Host)

2) Oracle VirtualBox Version 4.3.2.

3) Ubuntu 12.04 Desktop LTS Virtual Machine (Guest)

The VirtualBox network setup for Ubuntu VM is as below:

Adapter 1

Attached to : “NAT”

Name: no name

Advanced

Adapter Type: Intel PRO/1000 MT Desktop (82540EM)

Promiscuous Mode: Allow VMS

MCA Address: 080027E2E304

Cable Connected is ticked

There is no port forwarding

Adapter 2

Attached to: Host-only Adapter

Name: VirtualBox Host-Only Ethernet Adapter

Advanced

Adapter Type: Intel PRO/1000 MT Desktop (82540EM)

Promiscuous Mode: Allow VMS

MCA Address: 080027B5740B

Cable Connected is ticked

There is no port forwarding

The guest is able to ping host and host is also able to ping guest. This could be the reason why guest is able to only access internal web sites. The main problem is guest is not able to browse web sites external to the office, i.e it cannot connect to internet. Following is the ifconfig output from ubuntu.

eth0

Link encap:Ethernet HWaddr 08:00:27:e2:e3:04

inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0

inet6 addr: fe80::a00:27ff:fee2:e304/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:99 errors:0 dropped:0 overruns:0 frame:0

TX packets:291 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:17115 (17.1 KB) TX bytes:33151 (33.1 KB)
eth1

Link encap:Ethernet HWaddr 08:00:27:b5:74:0b

inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0

inet6 addr: fe80::a00:27ff:feb5:740b/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:10 errors:0 dropped:0 overruns:0 frame:0

TX packets:65 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:3848 (3.8 KB) TX bytes:11496 (11.4 KB)
lo

Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:119 errors:0 dropped:0 overruns:0 frame:0

TX packets:119 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:15122 (15.1 KB) TX bytes:15122 (15.1 KB)

------------------------------------------------------------------------------------------------------

sudo nano /etc/network/interfaces shows me the following

auto lo iface
lo inet loopback

I have observed that, if I ping any web site for eg. ping google, i see that the ping command executes, but waits for the response. It doesn't show any error. So, I press ctrl+c and this is what I get.

PING google (173.194.38.146) 56(84) bytes of data.
^C
--- google ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms


I am trying to figure out why Ubuntu VM doesnt connect to internet. Why Pinging to external web sites waits but doesnt return any error. Is it that Host is not able to send any response back, but proxy server would have sent back the packets to host to be sent to VM?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu VirtualBox VM not connecting to internet in comp

Post by Perryg »

Does ping by ip work?
Post Reply