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.

With a vanilla install of Ubuntu 12.04 on a vanilla install of Virtual Box with NAT on VB, my network settings seem to function incorrectly.

What baffles me is that I can ping www.google.com, but I can't wget www.google.com.

ping www.google.com
PING www.l.google.com (74.125.226.17) 56(84) bytes of data.
64 bytes from yyz06s05-in-f17.1e100.net (74.125.226.17): icmp_req=1 ttl=49 time=28.3 ms

vs.

wget http://www.google.com
--2012-05-08 12:09:32--  http://www.google.com/
Resolving www.google.com (www.google.com)... 74.125.228.48, 74.125.228.49, 74.125.228.50, ...
Connecting to www.google.com (www.google.com)|74.125.228.48|:80... failed: Connection timed out.

I am on a corporate network, so there might be firewall issues or other security settings that I am unaware of. But I find it strange that I sould be able to ping and not access http, since I can do both on the host system (Windows).

Amongst other questions:

  • should I assign the same MAC address to this virtual interface as the actual MAC address of the host's NW interface? Is this good or bad practice?

EDIT:

$ nslookup google.com 
Server:     127.0.0.1
Address:    127.0.0.1#53

Non-authoritative answer:
Name:   google.com
Address: 74.125.226.72
Name:   google.com
Address: 74.125.226.68
Name:   google.com
Address: 74.125.226.71
Name:   google.com
Address: 74.125.226.69
Name:   google.com
Address: 74.125.226.70
Name:   google.com
Address: 74.125.226.66
Name:   google.com
Address: 74.125.226.67
Name:   google.com
Address: 74.125.226.64
Name:   google.com
Address: 74.125.226.73
Name:   google.com
Address: 74.125.226.65
Name:   google.com
Address: 74.125.226.78

EDIT 2:

Is is possible that my VBox installation might be incomplete? I do not have admin rights to my host system. The installation seems to have gone well (I can install and run a virtual machine), but everytime I boot it tries to install something that I cannot identify (in true Windows style) and requires admin access, which I do not have. Could this potentially be the cause of my networking issues?

Note that when I open the list of network connexions it does include VirtualBox Host-Only adapter - so some installation has taken place, but possibly not all that's required.

share|improve this question
    
What kind of network configuration are you using in VB?. NAT? Bridge?. –  Javier Rivera May 9 '12 at 6:45
    
I use the plain NAT that comes out of the box (no configuration changes) (edited my question to reflect this) –  asoundmove May 9 '12 at 12:11
    
is nslookup google.com working? –  geoh May 13 '12 at 9:24
    
@Gevorg, sorry I did not see your reply for a while. Yes, nslookup returns what I would expect. See edit above. –  asoundmove May 25 '12 at 18:33
    
@asoundmove did there proxy or something like that? –  geoh May 25 '12 at 18:34
show 4 more comments

1 Answer

Every MAC address in the world should be unique, so don't assign the host MAC to your VM network card.

A connection time-out does suggest a firewall problem. However, normally, you would expect that the VM has the same capabilities as your host system. What the NAT interface actually does is substitute the VM IP address (typically 10.0.2.15) with your host's IP in network packets that are sent out. For the outside world, it seems that your VM network traffic originates from your host system.

share|improve this answer
    
Sorry I did not see your reply for a while, just like you I do expect the NAT to make my guest transparent, but it seems our firewall rules are a little wiser than that. –  asoundmove May 25 '12 at 18:40
add comment

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.