Nat Network-Linux Guest doesn’t have internet connection

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Clintjhipp
Posts: 1
Joined: 16. Oct 2018, 06:48

Nat Network-Linux Guest doesn’t have internet connection

Post by Clintjhipp »

Windows 10 Host running Kali Linux guest on Virtual Box with Nat Network connection
Kali can successfully ping 8.8.8.8, however cannot “apt-get update” or connect with internet browser.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Nat Network-Linux Guest doesn’t have internet connection

Post by socratis »

Try the following "commands" from a Command Prompt on your guest. I've included a sample output, with only the parameters that you should be focusing on:
$ ifconfig
enp0s3    Link encap:Ethernet  HWaddr 08:00:27:40:51:1a  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0

$ route -n
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 enp0s3
or if you prefer "nmcli":
$ nmcli d show
GENERAL.DEVICE:   enp0s3
GENERAL.HWADDR:   08:00:27:40:51:1a   <-- all VirtualBox NICs start with that number
IP4.ADDRESS[1]:   10.0.2.15/24
IP4.GATEWAY:      10.0.2.2
IP4.DNS[1]:       1.1.1.1
Then, once you have the key values, try the following commands:
$ ping <DefaultGateway>             <-- tests your connectivity
$ ping 1.1.1.1                      <-- tests outgoing/DNS connectivity
$ ping download.virtualbox.org      <-- tests name resolution
Report any misconfiguration, or any errors from the "ping" commands.

If you can "ping <DefaultGateway>", if you can "ping 1.1.1.1", if you can "ping download.virtualbox.org", VirtualBox is working as it should. You should look elsewhere for your networking connectivity. Look in your host for firewalls, proxies, antivirus filters, web-cleaning applications, redirectors, etc.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply