NAT problems - no internet access

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Alexander74
Posts: 4
Joined: 15. May 2007, 00:35

NAT problems - no internet access

Post by Alexander74 »

Hello together,

Host: Fedora Core 5 - Kernel 2.6.20-1.2316.fc5smp Intel PIII 1000 Hp Server E800 Client: normaly XP SP2 (without firewall) :)

When i choose the "NAT" config, to gain network access, i can see the samba server and it's directories - thats working fine. But i cannot get access to the internet. I've tried several things - here my ping problems:

Ping to 10.0.2.15 (Host) - OK
Ping to 10.0.2.2 (Client to Client) - OK
Ping to Linuxserver (Host) - gets 192.168.120.211 from DNS Server, but the ping gets a timeout
Ping to f.Ex. Router 192.168.120.101 - timeout
Ping to www.google.de - timeout - no DNS resolvement
Ping from host to the Client - timeout

Whats going wrong? Where can i search to find a solution? I don't know, why i can see the samba directories of my host, but cannon geht internet access.

Thank you very much!

Greetings
Alex
is13
Posts: 2
Joined: 15. May 2007, 20:18

Post by is13 »

In guest OS set DNS-address same as in the host.

Regards!
:)
Alexander74
Posts: 4
Joined: 15. May 2007, 00:35

Post by Alexander74 »

is13 wrote:In guest OS set DNS-address same as in the host.
Ok -i've tried this, but it's not working - no DNS resolution from for example www.google.de, no ping response on both configurations (under 10.0.2.2 is my server). But a Ping on 10.0.2.2 is working!

To set the DNS Server to 192.168.120.211 (the real IP from the host) is also not working.

What can i do addional...?

Greetings
Alex

Settings from DHCP Server

Verbindungsspezifisches DNS-Suffix:

Beschreibung. . . . . . . . . . . : Ethernetadapter der AMD-PCNET-Familie

Physikalische Adresse . . . . . . : 08-00-27-4F-6B-6C

DHCP aktiviert. . . . . . . . . . : Ja

Autokonfiguration aktiviert . . . : Ja

IP-Adresse. . . . . . . . . . . . : 10.0.2.15

Subnetzmaske. . . . . . . . . . . : 255.255.255.0

Standardgateway . . . . . . . . . : 10.0.2.2

DHCP-Server . . . . . . . . . . . : 10.0.2.2

DNS-Server. . . . . . . . . . . . : 10.0.2.3

Lease erhalten. . . . . . . . . . : Dienstag, 15. Mai 2007 21:45:43

Lease läuft ab. . . . . . . . . . : Mittwoch, 16. Mai 2007 21:45:43


Manual setting:
Verbindungsspezifisches DNS-Suffix:

Beschreibung. . . . . . . . . . . : Ethernetadapter der AMD-PCNET-Familie

Physikalische Adresse . . . . . . : 08-00-27-4F-6B-6C

DHCP aktiviert. . . . . . . . . . : Nein

IP-Adresse. . . . . . . . . . . . : 10.0.2.15

Subnetzmaske. . . . . . . . . . . : 255.255.255.0

Standardgateway . . . . . . . . . : 10.0.2.2

DNS-Server. . . . . . . . . . . . : 10.0.2.2
is13
Posts: 2
Joined: 15. May 2007, 20:18

Post by is13 »

Alexander74 wrote:
is13 wrote:In guest OS set DNS-address same as in the host.
Settings from DHCP Server
....
DNS-Server. . . . . . . . . . . . : 10.0.2.3
....
DNS-Server. . . . . . . . . . . . : 10.0.2.2
Why 10.0.2.3 and 10.0.2.3 but not real DNS-server?
Alexander74
Posts: 4
Joined: 15. May 2007, 00:35

Post by Alexander74 »

is13 wrote:
Alexander74 wrote:
is13 wrote:Why 10.0.2.3 and 10.0.2.3 but not real DNS-server?
Wow - that's the right solution. (this have to be written down in the faq)

I've set the gateway to 10.0.2.2 and the DNS Server to 192.168.120.101 from my router.

Everything's ok - but - why doesn't it goes by DHCP? Can anyone tell me how to configure the DHCP, so that the NIC gets the right DNS Server in NAT mode?

THX
Alex
(Very pleased user wants to thank you!)
michael
Oracle Corporation
Posts: 682
Joined: 10. May 2007, 09:46
Contact:

Post by michael »

Things should actually work using DHCP and the "internal" DNS server which VirtualBox NAT returns to you - the internal server just passes on DNS requests to the host. Note though that due to the way VirtualBox implements NAT you are not able to ping anything outside of the virtual NAT network - ping requires administrator privileges (the ping binary on Linux is SUID root), and VirtualBox NAT networking works with normal user privileges. You should still be able to get web pages and whatever.
Alexander74
Posts: 4
Joined: 15. May 2007, 00:35

Post by Alexander74 »

Hello Michael,

ok - i know now how the ping function works. That was the wrong way :)

But - do you know why the passthrough of DNS requests dosen't working? Should i look for some settings in the host operating system?

And a second question: How can i gain access to other windows computers and their drives and printers?

Thx a lot for your time!

Alex
michael
Oracle Corporation
Posts: 682
Joined: 10. May 2007, 09:46
Contact:

Post by michael »

It sounds to me like it might be firewall settings, although it is strange, because we are not aware of such problems using the default installation. If you are able to determine why this is happening to you, we would definitely be grateful if you let us know (opening a bug report on http://www.virtualbox.org/wiki/Bugtracker if appropriate).

Regarding accessing Windows systems from a guest. As far as I know (anyone who knows better may correct me here) it is currently not possible to resolve Windows names with NAT as WINS resolving requires the requesting computer to accept a connection from the WINS server. (Actually you could set up forwarding of the ports involved, but that would prevent the host system from resolving Windows names). However, you can access Windows services using the IP address of the computer they are located on without any changes to the standard configuration.
vpablos
Posts: 5
Joined: 28. Oct 2008, 21:57

Post by vpablos »

Hi.

I'm having the same problem on ubuntu hardy.
The only thing I have different is I installed pdnsd to resolve ips in a faster way.

Did you found any solution?

It's a little bit strange, as at work I use Debian Lenny and it works without any problem, pdnsd installed too.

Don't know if it can be due to resolvconf or something like this.

Thanks in advance,

Víctor
vpablos
Posts: 5
Joined: 28. Oct 2008, 21:57

Problem solved on ubuntu

Post by vpablos »

I have not tried it, but this can solve the problem:
http://ubuntuforums.org/archive/index.php/t-599163.html
vpablos
Posts: 5
Joined: 28. Oct 2008, 21:57

Finally I found how to solve the problem.

Post by vpablos »

This can be used and is the better idea so you can have more than one virtual machine working at the same time.

Nat networking:
https://wiki.ubuntu.com/VirtualBoxNetworking

Bridged networking:
https://wiki.ubuntu.com/VirtualboxHostNetworkingAndWIFI

Finally I found the solution ;-)
Post Reply