VirtualBox - Can't connect to internet NAT adaptor

Discussions related to using VirtualBox on Linux hosts.
Post Reply
inessa
Posts: 1
Joined: 29. Aug 2018, 14:30

VirtualBox - Can't connect to internet NAT adaptor

Post by inessa »

Good Evening,

I'm having an issue with VirtualBox networking.

I am running a client-server architecture, whereby both machines have one adaptor as NAT, and another as internal network to communicate with each other. When operating virtualbox at uni (connected to wi-fi), the machines both are able to ping google as well as each other, so the networking is fine.

For some reason, over the last few days, coming back to my room and connecting to Wi-fi, it doesn't seem to work. I tried having just one adaptor on each machine, and when I do that seems to work fine (there is internet access when I only have one adaptor connected to NAT.) However switching on both adaptors, the machines can ping each other, but do not get internet access. I am using an Ubuntu Machine as the client, and a Debian Machine as the server.

Any help would be greatly appreciated. Cheers
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: VirtualBox - Can't connect to internet NAT adaptor

Post by socratis »

You didn't mention host, guests or VirtualBox versions, builds, revisions. You kind of have to, so that we know what we're talking about. And mind you: Debian/Ubuntu/other is *not* a version, it's a "family of OSes". Details might be essential. There's a huge difference between Ubuntu 8.04 and 18.04. And it's not just that "1" digit... ;)

We're also going to need the network configuration of the guests. And the host. Outputs of "ifconfig -a" or "nmcli dev show" for example. From both situations; work/home. And the diagnostics that you've attempted. Ping what from what? With numbers...
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.
naus911
Posts: 2
Joined: 20. Sep 2018, 16:20

Re: VirtualBox - Can't connect to internet NAT adaptor

Post by naus911 »

You have check the your ip configuration in you Guest VM.
I had the same problem and did put the ip address manual.
in your NAT configuration
you must have the gateway with 10.0.2.2 and the DNS too the same ip 10.0.2.2.

good look!
Post Reply