Hello everyone,
My VirtualBox installation has an issue. The guest VMs ( guests are Oracle Linux) don't have internet access when network adapter is NAT (default).
Request you to please advise if you faced this kind of issue. Thank you!!
Here are the details of my configuration:
Host : Windows 10
VirtualBox version : 6.0.18 r136238 (Qt5.6.2)
Guest OS : Oracle Linux
I tried yum, ping and curl. But, nothing works because the guest VM doesn't have internet connectivity.
I have attached the log of the VM to this post. Here are the approaches I tried to resolve the issue.. But, no luck. Please let me know if you need additional information.
Approach 1: Identifying the IP detail and DNS details
PFA screenshot which has ifconfig and dns details.
Approach 2: Internet works when adapter is changed manually to "Bridged Adapter" mode.
But, my Virtual Box is managed by Kitchen&Vagrant. Hence, VBox needs internet connectivity with NAT (default) adapter.
Approach 3: Uninstalled VirtualBox-6.1.4-136177-Win, reboot, and then installed VirtualBox-5.2.38-136252-Win
Still internet connectivity in NAT doesn't work.
Approach 4: Uninstalled VirtualBox-5.2.38-136252-Win, reboot, and then installed 6.0.18 r136238 (Qt5.6.2)
Still internet connectivity in NAT doesn't work.
Approach 5: Tried checking adapters (Control Panel\Network and Internet\Network Connections) in windows10 host.
Both "VirtualBox Host-Only Network" and "Both VirtualBox Host-Only Network #2" are in Enabled state. I am also not sure if these are related to NAT adapter.
Best,
Manush
NAT - no internet connectivity for guests
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: NAT - no internet connectivity for guests
Not getting internet in a NAT-connected guest is very unusual. Please do these things:
Reboot your host to get a fresh environment.
Start the guest from cold boot, not save-state. Run until you see the problem happen, then shut down the guest from within the guest OS if possible. If not possible, close the Virtualbox window for the guest with the Power Off option set.
Please zip and post the guest's vbox.log, using the forum's Upload Attachment tab. Also put the guest's .vbox file in the zip.
When the guest is running without internet, run 'ifconfig' in the guest and 'ipconfig /all' on the host. Put the text outputs of each of these commands in
Reboot your host to get a fresh environment.
Start the guest from cold boot, not save-state. Run until you see the problem happen, then shut down the guest from within the guest OS if possible. If not possible, close the Virtualbox window for the guest with the Power Off option set.
Please zip and post the guest's vbox.log, using the forum's Upload Attachment tab. Also put the guest's .vbox file in the zip.
When the guest is running without internet, run 'ifconfig' in the guest and 'ipconfig /all' on the host. Put the text outputs of each of these commands in
Code: Select all
tags here on the forum.Re: NAT - no internet connectivity for guests
Hi scottgus1,
Thanks for your inputs. I have attached both vbox. log and . vbox config files to this post.
Here is the IP configuration from host and guest. Please note that I did not make any changes to IPs. But, just anonymized sensitive data like company name.
The forum doesn't allow me to post IPconfig. It throws the error: "You must be a member for 1 days and have 1 posts before you can post urls." Hence, I attached IPconfig of both host and guest.
Thanks for your inputs. I have attached both vbox. log and . vbox config files to this post.
Here is the IP configuration from host and guest. Please note that I did not make any changes to IPs. But, just anonymized sensitive data like company name.
The forum doesn't allow me to post IPconfig. It throws the error: "You must be a member for 1 days and have 1 posts before you can post urls." Hence, I attached IPconfig of both host and guest.
Re: NAT - no internet connectivity for guests
PFA
- Attachments
-
- ipconfig.zip
- (33.4 KiB) Downloaded 213 times
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: NAT - no internet connectivity for guests
According to my reading of the log, NAT is working. It is sending packets but not receiving any, so I'm going to say that you have some kind of AV internet filter on the host that blocks apps by default.
Re: NAT - no internet connectivity for guests
Hi mpack,
Thanks for your inputs. I disabled Windows firewall defender, restarted VBox, and still there is no internet with NAT adapter... Is there a way, I can trace this network issue?
Best,
Manush
Thanks for your inputs. I disabled Windows firewall defender, restarted VBox, and still there is no internet with NAT adapter... Is there a way, I can trace this network issue?
Best,
Manush
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: NAT - no internet connectivity for guests
I don't believe Defender is responsible for this. Almost everybody who has Win10 installed has Defender, and they don't see this problem. This kind of problem is usually caused by some kind of host config issue, or deliberate policy, e.g. a business proxy server with filtered access. As to tracing the fault, someone else will have to help you with that, as I don't consider myself a network tools expert.
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: NAT - no internet connectivity for guests
If I read this right, and 'enp0s3' is the guest's NAT Ethernet adapter, then here's your problem:
Your .vbox file shows that you once tried Bridged, which would have the guest's ip address in the host's ip address range as it is now. That the guest's ip is still set to the host's range, instead of the NAT default of 10.0.2.15, indicates a couple of possibilities:
1. The guest's adapter was set to static ip address to match the host's range when Bridged was being tried, and it's still set to static.
2. I have run across some forum posters whose Linux guests' network adapters seem to hold onto old ip address range data when the network type gets changed to a different ip range. Might be, and probably is, bunkum, but try to reset the network adapter in the guest.
NAT acts like a house router (see Virtualbox Networks: In Pictures: NAT). Like regular routers, NAT expects the 'LAN' guest side to be a different ip range than the 'WAN' host side. If the 'LAN' side's ip address range is same as the 'WAN' side (like yours is, both sides in 192.168.0.### range) then all bets are off.HOST IP Configuration Wireless LAN adapter Wi-Fi: IPv4 Address. . . . . . . . . . . : 192.168.0.17(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.0.1 DHCP Server . . . . . . . . . . . : 192.168.0.1 Guest IP CONFIG: enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.18
Your .vbox file shows that you once tried Bridged, which would have the guest's ip address in the host's ip address range as it is now. That the guest's ip is still set to the host's range, instead of the NAT default of 10.0.2.15, indicates a couple of possibilities:
1. The guest's adapter was set to static ip address to match the host's range when Bridged was being tried, and it's still set to static.
2. I have run across some forum posters whose Linux guests' network adapters seem to hold onto old ip address range data when the network type gets changed to a different ip range. Might be, and probably is, bunkum, but try to reset the network adapter in the guest.
Re: NAT - no internet connectivity for guests
I faced similar issue and figured out that network adapter was not active. Edited network connection using 'nmtui' command and changed to active.