Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 to www.google.com)

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)
share|improve this question
    
Sounds to me like Ubuntu is using the wrong virtual lan as your primary adapter. Any reason you've added 2? I could be wrong, but that's where I'd start. This post will help you check and if needed change your primary adapter: askubuntu.com/questions/418567/… –  user253120 Feb 28 at 1:27

3 Answers 3

What OS are you running inside the VM? Is it Linux hosting Windows or the other way around. If you are able to browse internal websites such as intranet.abc.com but not able to browse google.com this seems to be some sort of DNS issue.

Have you changed the types of VM adapters the hosted OS is using? I forgot which ones are listed but I believe there are three options.

And your company. Is this a large company i.e. handling PHI and whatnot. Some firewalls and IDS/IPS and Nexus devices are terrible about blocking VM's from going outsite the company :(

Feed us some more information brother.

share|improve this answer
    
As I have mentioned in my main question text, VM is running Ubuntu 12.04. If this is a DNS issue, then I should be able to access any web site with their IP address. For eg. I tried to access google by its IP address, but the result is same. If I am trying to connect to internet through Host Via NAT, then how would devices come to know whether it is VM which is trying to access internet. In NAT, would be a common IP be used (in this case Hosts'?). I am not sure what you mean by VM Adapters. If you read my question you will see the adapters I have selected. –  KurioZ7 Feb 27 at 5:16

It may be network issue in that time.

But in your company they blocked the virtual machine access the internet. I think this could be reason.

Just try to refresh the MAC address and check.

share|improve this answer
    
Does this mean that my company might have blocked the access to internet based on MAC Address? –  KurioZ7 Feb 28 at 5:20

I have resolved this issue. The solution was simple. Since the only issue was internet connectivity, I configured the proxy manually. I went to FireFox -> Edit -> Preferences. Under 'Network' tab, clicked on "Settings" button. Under this provided the IP address of the proxy, which is accessible from the VM. (Ping the IP addresses of the available proxy severs on your network, before giving this IP in the proxy setting). I have tried this in both NAT and Bridged Adapter setting and it is working file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.