10

I am running an Ubuntu 13.04 in the VirtualBox on Windows7. The network option is NAT.

The problem is I can use apt-get command to get some package on the internet like : curl. I can access those share computers on my Win7.

it is really wired that I just sent an email using Thunderbird. But I can not access internet through Firefox.

However, I can not access the internet through Firefox. And no response while ping www.google.com.

That's all!

1
  • can you show us some more information? open a console (ctrl t), type sudo ifconfig, also test DNS, (again in console) "ping www.google.com" and finally "ping 8.8.8.8"
    – Sverre
    Commented Jul 21, 2014 at 4:16

5 Answers 5

13

It looks like you have not set up the DNS service on your Ubuntu guest. The following commands should take care of that.

sudo su
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
exit
1
  • agree, seems like a DNS problem.
    – Sverre
    Commented Jul 21, 2014 at 4:17
2

Use NAT mode instead of Bridged Mode, make sure your connection works, if it does, then there's something wrong with the Network settings you used in Bridged mode, if it doesn't it's probably your network card, router, or something else.

2

Sometimes VirtualBox doesn't add networks automatically. From the main menu (not a specific machine) goto:

File >> Preferences >> Network

Add network by pressing + sign at the right column.

enter image description here

enter image description here

1

On the Settings for the Ubuntu VM change the network option to Bridged Adapter. Some information from the VirtualBox manual:

With bridged networking, VirtualBox uses a device driver on your host system that filters data from your physical network adapter. This driver is therefore called a "net filter" driver. This allows VirtualBox to intercept data from the physical network and inject data into it, effectively creating a new network interface in software.

The VirtualBox networking engine may not be working as intended, which may be causing the issues you're seeing.

Additional Info: An advantage of using the Bridged Adapter option is that it would make the VM appear as a physical device on your network, therefore allowing you to share folders/files just like you would be able to with a physical device. This is particularly useful when setting up a Server VM.

3
  • Hi, Thanks you. I just tried your idea. But still can not connect to internet. The internet connection tray (on the top right of the screen) turns into that like wireless connection from the double arrow. And massage says disconnected. And I even lost Thunderbird connection. when I ping www.google.com . It says "Ping unkown host www.google.com"
    – leo
    Commented Sep 22, 2013 at 0:29
  • When you use the Bridged Adapter option, does the drop-down show the name of your physical adapter? For example, mine says Intel(R).....
    – Yass
    Commented Sep 22, 2013 at 8:49
  • yes, the setting page like below: /////////////////////////////////////// Enable Network Adapter Attached to: Bridged Adapter Name: Inter(R) 82579LM Gigabit NetWork Connection Advanced Adapter Type:PCnet-FAST III(Am79C973) Promiscuous Mode:Allow VMs MAC Address:080027C3B7E Cable connected ///////////////////////////////// Still can not surf internet on Firefox. But can send email using Thunderbird.
    – leo
    Commented Sep 22, 2013 at 10:31
0

make sure that the cable is connected. this can be ensured by ticking the table connected in the advanced options for the NAT adapter

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .