NAT does not work

Discussions related to using VirtualBox on Windows hosts.
mirakulix
Posts: 10
Joined: 18. Aug 2015, 18:07

NAT does not work

Post by mirakulix »

Hello

First sorry for my bad english ^^

My problem: In my GuestOS I only can access the internet with a Bridged-Network.

If I use NAT in my settings I can't access the internet. It doesn't matter which OS I use (linux, windows, etc... none of these guests can load a webpage in the browser)
Host: Windows 8.1 64-bit
Antivir: Avast Free
VBox 5.0.2 ->Had also this problem with 4.X. I uninstalled VirtualBox 4 and installed Version 5 but did not change anything.
My settings for an exemplary Guest OS:
Image

If you need more informations please let me know

What I already tried:
deactivated the Firewall in my host: Windows 8.1 , no success
Change the DNS-Server in my Guest OS to 8.8.8.8 , no success
reinstall VirtualBox, no sucess...
Edit:// dactivated Avast Free, no success

p.s i already wrote the same text in german but no one answers
viewtopic.php?f=5&t=69646
Last edited by mirakulix on 20. Aug 2015, 11:46, edited 1 time in total.
bichu
Posts: 5
Joined: 30. Jul 2015, 14:32

Re: NAT does not work

Post by bichu »

I have the same problem. Host: Windows x64 8.1 and VirtualBox 5.0.2.
piggyz
Posts: 70
Joined: 13. Feb 2013, 12:28

Re: NAT does not work

Post by piggyz »

This two posts are another evidence of a totally broken network stack under Wndows 10.

As I also said, it can happen if Bridget network works (never in my case if you do not start guest in Windows 7 or 8 compatibility), it can happen NAT will not work. Then NAT will ALWAYS work (no even needed to start guest machine in compatibility mode) if bridged mode not work in the sense hardware network devices are not in guest network drop down menu configuration.

If I was a Virtualbox developer I will start to look at what compatibility mode do and I will try to emuate that code in Virtualbox binary, obviously trying not to broke the function in Windows 7 or 8.

Then one Oracle employe from here (I don't know if a developer or just one moderator of the forum) said he can't reproduce the problem. Strange, very strange considering today I was able to reproduce the problem on other two machines, both Intel platform, one with X99 and the other with Z97 Intel chipset. Host: Windows 10 Professional, Guest eerything you could image.
mirakulix
Posts: 10
Joined: 18. Aug 2015, 18:07

Re: NAT does not work

Post by mirakulix »

Hmm, but I have the problem under Windows 8.1 that's why im bewildered.
Under Win10 i would say its a new OS and Microsoft changed a lot, but under Windows 8.1 I can not say what the problem is.
piggyz
Posts: 70
Joined: 13. Feb 2013, 12:28

Re: NAT does not work

Post by piggyz »

mirakulix wrote:Hmm, but I have the problem under Windows 8.1 that's why im bewildered.
Under Win10 i would say its a new OS and Microsoft changed a lot, but under Windows 8.1 I can not say what the problem is.
I didn't had it under Windows 8.x before the upgrade, then if it now it has, the situation on Virtualbox development is even worst. I just can say, I didnt pay support for it, then other virtualization platforms I do use on other systems, two of them, doesn't have any network problem under Windows 10 host with any kind of hosts and any kind of network configuration. So blaming Microsoft "becouse it even change code when it works", admitting it is true, it surely doesn't bother other competitors..

PS. considering Sun, now Oracle, had made one of the best OS I know, Solaris, an OS like we all knows with rock solid network stack, it is strange to me such network expertx can't fix a problem like this. BTW, I probably think Virtualbox development is made out of Oracle home, maybe in germany from some former developer totally stranger to Oracle group (simply a foreign employes or so), and it is the reason becouse they need all this time to fix this network stack problem. Just a guess, I don't really know. Then Oracle Projecct Manager in Oracle home, should now take care of the situation, even if it is free software if they still want to publish it.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: NAT does not work

Post by noteirak »

@mirakulix: Nobody replied most likely because you did not read/follow the instructions given in Minimum information needed for assistance. In this case we would need a VM log file and the guest settings. When creating your first post, you are warned about this.

Now, about your issue, run the following commands in the guest and report the output please:

Code: Select all

sudo ifconfig -a
sudo route -n
ping 8.8.8.8
nslookup 8.8.8.8
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: NAT does not work

Post by mpack »

@piggyz: please do not post into a topic unless you have something constructive to add. It will just start flame wars, and besides which I see nothing useful in your posts here. You are merely asserting an opinion without basis, and being of no help to the OP whatever.
mirakulix
Posts: 10
Joined: 18. Aug 2015, 18:07

Re: NAT does not work

Post by mirakulix »

First thanks for trying to help
Perhaps i clicked to fast when the information about the minimum information needed for assistance appeared, sorry.

But here are the minimum information needed for assistance (LOG file from LXLE (live-cd) as an example OS, but problem is with every OS)
http://pastebin.com/JLQgyUME
(I also uploaded it as attachment)
lxle-2015-08-21-18-17-12.log
LXLE logfile
(74.16 KiB) Downloaded 142 times
VBoxStartup LOG:
http://pastebin.com/rYAp4L68
VBoxStartup.zip
VBoxStartub LOG
(26.32 KiB) Downloaded 119 times
And the commands from @noteirak
http://pastebin.com/gm0PTzxk

also as upload (tip: open it with notepad because formatting is shitty)
commands.txt
commands from noteirak
(3.02 KiB) Downloaded 151 times


COMMANDS

Code: Select all

qwerty@qwerty:~$ sudo ifconfig -a
eth0      Link encap:Ethernet  HWaddr 08:00:27:9a:3c:58  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: XXXX::aX0:2XXf:XXXX:3X5X/64 Scope:Link //NOT SURE IF I CAN GIVE OUT THIS INFORMATION
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:370 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3196 (3.1 KB)  TX bytes:36887 (36.8 KB)
          Interrupt:10 Base address:0xd020 

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:301 errors:0 dropped:0 overruns:0 frame:0
          TX packets:301 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:21168 (21.1 KB)  TX bytes:21168 (21.1 KB)

qwerty@qwerty:~$ sudo route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
10.0.2.0        0.0.0.0         255.255.255.0   U     1      0        0 eth0

qwerty@qwerty:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=54 time=69.6 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=54 time=63.6 ms
64 bytes from 8.8.8.8: icmp_req=5 ttl=54 time=82.9 ms
64 bytes from 8.8.8.8: icmp_req=6 ttl=54 time=81.8 ms
64 bytes from 8.8.8.8: icmp_req=7 ttl=54 time=64.5 ms
64 bytes from 8.8.8.8: icmp_req=8 ttl=54 time=77.3 ms
64 bytes from 8.8.8.8: icmp_req=9 ttl=54 time=79.5 ms
64 bytes from 8.8.8.8: icmp_req=10 ttl=54 time=69.6 ms
64 bytes from 8.8.8.8: icmp_req=12 ttl=54 time=95.7 ms
64 bytes from 8.8.8.8: icmp_req=13 ttl=54 time=67.8 ms
64 bytes from 8.8.8.8: icmp_req=14 ttl=54 time=51.3 ms
64 bytes from 8.8.8.8: icmp_req=15 ttl=54 time=79.5 ms
64 bytes from 8.8.8.8: icmp_req=16 ttl=54 time=59.6 ms
64 bytes from 8.8.8.8: icmp_req=17 ttl=54 time=88.5 ms
64 bytes from 8.8.8.8: icmp_req=18 ttl=54 time=83.2 ms
64 bytes from 8.8.8.8: icmp_req=19 ttl=54 time=72.9 ms
64 bytes from 8.8.8.8: icmp_req=20 ttl=54 time=50.7 ms
64 bytes from 8.8.8.8: icmp_req=21 ttl=54 time=42.1 ms
64 bytes from 8.8.8.8: icmp_req=22 ttl=54 time=75.8 ms
64 bytes from 8.8.8.8: icmp_req=24 ttl=54 time=88.3 ms
64 bytes from 8.8.8.8: icmp_req=25 ttl=54 time=90.4 ms
64 bytes from 8.8.8.8: icmp_req=26 ttl=54 time=51.9 ms
64 bytes from 8.8.8.8: icmp_req=27 ttl=54 time=55.1 ms
64 bytes from 8.8.8.8: icmp_req=28 ttl=54 time=55.0 ms
64 bytes from 8.8.8.8: icmp_req=29 ttl=54 time=66.5 ms
64 bytes from 8.8.8.8: icmp_req=30 ttl=54 time=95.1 ms
^C //CANCELLED THE PING, THINK ITS ENOUGH
--- 8.8.8.8 ping statistics ---
30 packets transmitted, 26 received, 13% packet loss, time 29055ms
rtt min/avg/max/mdev = 42.186/71.514/95.704/14.617 ms

qwerty@qwerty:~$ nslookup 8.8.8.8
;; connection timed out; no servers could be reached

qwerty@qwerty:~$ 

mirakulix
Posts: 10
Joined: 18. Aug 2015, 18:07

Re: NAT does not work

Post by mirakulix »

No one with a solution?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: NAT does not work

Post by noteirak »

Power off the machine, run the following command (change VM name) and restart the VM:

Code: Select all

VBoxManage modifyvm "VM name" --natdnshostresolver1 on
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
mirakulix
Posts: 10
Joined: 18. Aug 2015, 18:07

Re: NAT does not work

Post by mirakulix »

@noteirak
Did not work (maybe i did it wrong)
What i did:
I look up what the name from the machine is.
Image
  • The name is lxle
  • Open CMD in windows 8 and changed to virtualbox folder

    Code: Select all

    cd C:\Program Files\Oracle\VirtualBox

    Code: Select all

    VBoxManage modifyvm lxle --natdnshostresolver1 on
  • Start guest lxle and open firefox (this time the "Failed to Connect" appears immediately)
    did not work
  • Tried again with " "

    Code: Select all

    VBoxManage modifyvm "lxle" --natdnshostresolver1 on
  • Start guest lxle and open firefox (this time the "Failed to Connect" appears immediately)
    did also not work
The virtualbox software was closed while i executed the commands (controlled with task-manager)

Did I do something wrong?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: NAT does not work

Post by mpack »

I'm concerned with why "Other Linux" has been chosen as the guest type. What actually is the guest? If it is LXLE (an Ubuntu derivative), then I would expect Ubuntu (32bit) as the guest type.

Also, why the strange choice of virtual network adapter? I believe the default for Ubuntu is "Intel PRO/1000 MT Desktop (82540EM)".

8GB is very small for a modern hard disk. I hope that doesn't indicate that you went for a fixed size disk?
mirakulix
Posts: 10
Joined: 18. Aug 2015, 18:07

Re: NAT does not work

Post by mirakulix »

@mpack thanks for post a possible solution
But this OS (LXLE) is only created for the purpose of posting in this forum, like i said i have this problem with "NAT" on all my Guest OS (Windows XP, Linux Mint, Ubuntu, etc.)
I only downloaded and istalled LXLE for testing purpose because if something goes wrong with this GuestOS i don't really care, but if I could not connect as example with my Linux Mint to the Internet (what unfortunately works now only with bridged network) i would have a problem and would have to copy my files to a connected GuestOS.

And under LXLE I could connect with internet, but only if i have my Networksettings on; bridged (thats why i think it is not reallythe strange virtual network adapter)
But i can change this settings if you like and try if it works :wink:

EDIT; Changed to recommended settings:
Image
did not work (Connection Failed)

This is what I see on every OS when the setting is on NAT (on bridged-network google open without a problem):
Image
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: NAT does not work

Post by mpack »

mirakulix wrote:@mpack thanks for post a possible solution
But this OS (LXLE) is only created for the purpose of posting in this forum, like i said i have this problem with "NAT" on all my Guest OS (Windows XP, Linux Mint, Ubuntu, etc.)
If you want me to consider a given scenario, post a log file that describes that scenario. I will not discuss generalities. I have looked at the log you provided, and you have seen my comments.

I can see that the DNS servers address you have there is BS (on my guest most of the IPv4 settings are the same as yours. My host is XP, so I don't have IPv6). Have you done anything on the host that might be blocking access to DNS?
mirakulix
Posts: 10
Joined: 18. Aug 2015, 18:07

Re: NAT does not work

Post by mirakulix »

@mpack
What logfiles do you want? I have posted some before, do you need others? if so, could you please explain which one? Because i could not find some other logfiles for this guestOS
The DNS-Server in this Guest is changed to 8.8.8.8 (google-dns) because I have read somewhere that it could be a solution, but it isn't.
On the other GuestOS it is DNS: 10.0.2.3 (mostly standard config) but does also not work on the guests

I also don't have IPv6 (lxle shows the name but its empty )

The only Software which could blocking access to DNS on my Host COULD be Avast Free Antivirus (but then I think others should have this problem too)
I also don't have changed something in the VirtualBox settings (only in GuestOS settings but i could upload my settings in pictures if you want)

Like I said please say which Logfiles you need (and how I can get them) because i have no idea what to do anymore.

As additional info: Meanwhile i tried VMWare Player also with NAT network and it worked like a charm.
But i would like to stay with VirtualBox because of different reasons.

//Sorry if it maybe sounds a bit unfriendly but thats because english is not my native language :|
Oh, and please say if you would rather have the Logfile on pastebin or upload here as attachment
Post Reply