NAT doesn't work

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Vasiliev
Posts: 4
Joined: 11. Jan 2009, 23:09

NAT doesn't work

Post by Vasiliev »

Hello, I use VirtualBox for a long time, and at first (i use NAT - default, host = winXP sp3, guest = ubuntu) net worked very well. But then.. i don't know, but one day it stopped working. But it still worked on another guest, so i didn't cared a lot about it. Now it doesn't work at all! :(
So, to test if this is bug of this concrete guest i've installed virtualbox2.10 and created new machine where loaded from ubuntu livecd, but i cannot ping google anyway.

Please, help me and thank you.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Do you have a firewall on the Host? See the VirtualBox FAQ for some programs that give problems with VB NAT.
Did you also let the Guests be at standard settings, so DHCP?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Vasiliev
Posts: 4
Joined: 11. Jan 2009, 23:09

Post by Vasiliev »

Thank you, Sasquatch, and excuse me for troubling. :oops:
Problem was with DNS, and now I've solve it.
moha
Posts: 1
Joined: 15. Jan 2009, 23:22

Post by moha »

Hi!

I have a problem with NAT.
Currently I am experimenting with different Linux distros to choose wich one to be permanenty installed.

Host system: WinXP SP2, VirtualBox 2.1.0, behind a router with static IP on the local network (no DHCP on the router)
Guest systems: Ubuntu Hardy Heron and Fedora 10 (problem is the same on both systems).

Network adapter on the guest is working and takes the IP (10.0.2.15) from VirtualBox but the internet connection is not working. On the firewall of the host system, VirtualBox is defined as a trusted application (no restrictions on network access) so this can't be the problem. DNS resolving works on the guest and remote hosts (e.g. google.com) are answering to ping. If I try to access anything via http or ftp, connection builds up, but no data is received.
I tried all of the network drivers in VirtualBox to no avail. Since the problem is the same with two different guest systems I think it is either a problem of VirtualBox or the host windows system.

Can you help me with this issue?

Thanks in advance,
Moha
Vasiliev
Posts: 4
Joined: 11. Jan 2009, 23:09

Post by Vasiliev »

Hello, Moha!
Your problem is similar to my.
So, you should find out dns server names from your host os and manually set them in guest os.

From my experience, to find out your dns servers names in windows you should use commands

nslookup
<or>
ipconfig /all

Then, you must set them up in guest system. In linux os, dns are situated in /etc/resolv.conf (you can read man page on it). Also in ubuntu there is gui for setting up network - network-manager (in fedora - i don't know). If you set up them correctly, network would work.

But there is another problem: /etc/resolv.conf is changing every reconnect, if you use dhcp. This causes dns server names to be rewritten every reconnect.
I've found different decisions of this problem (such as using /etc/resolv.conf.tail and .head; changing user privilegies on /etc/resolv.conf; also i tried to configure dhcp properly:)), but i can't still get my network work properly on every reboot of my guest. Howewer, it doesn't strongly worry me, because it tooks about minute to set up net on guest and i reboot very rarely :)

So, if you find the decision of last problem (my guests are also *buntu), let me know, please.
Post Reply