No VM internet access when changing WiFi networks

Discussions related to using VirtualBox on Windows hosts.
Post Reply
N7
Posts: 6
Joined: 14. Aug 2019, 15:44

No VM internet access when changing WiFi networks

Post by N7 »

I created multiple VMs (CentOS) on my Win10 laptop, each using Bridged Adapter for Networking and had no issues. They could all access the internet and each other. Then I went on a trip and connected to hotel Wifi. No access to internet only from VMs. I then tried at a friends house and connected to his WiFi. Same thing - no internet access from VMs. Back at home, tried on my own Wifi again (no changes) and still works like a champ.

But , I travel a lot and need it to work on Wifi networks other than my own. What settings am I missing?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: No VM internet access when changing WiFi networks

Post by mpack »

Why does it need to be bridged?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: No VM internet access when changing WiFi networks

Post by scottgus1 »

Bridged does not always work with wi-fi, due to how strictly the wifi adapter drivers and the access point firmware interpret the wifi standard. Strictly speaking, Wifi does not allow Bridging. But some drivers & firmware are lax in implementing everything the wi-fi standard calls for, and Bridging will work in those circumstances.

You have a lax setup in your house router firmware. The other two places were more strict, so the guests couldn't Bridge. However, NAT does work with Wi-fi. You can NAT each guest, or if you want them all communicating with each other, you could make a NAT network and put all the guests on that network. NAT & NAT network act like house routers, so host-to-guest access would require port fowarding to each NATted guest, or to the NAT network, just like if you were trying to communicate to a PC on the LAN from outside on the internet.
N7
Posts: 6
Joined: 14. Aug 2019, 15:44

Re: No VM internet access when changing WiFi networks

Post by N7 »

It doesn't have to be a Bridged Adapter. I just changed to NAT and same thing - no internet.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: No VM internet access when changing WiFi networks

Post by scottgus1 »

Are you posting from the hotel or your friend's house?
N7
Posts: 6
Joined: 14. Aug 2019, 15:44

Re: No VM internet access when changing WiFi networks

Post by N7 »

Hotel.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: No VM internet access when changing WiFi networks

Post by mpack »

Is this just an standard WiFi (only SSID and password needed) or does it go through one of those hotel paywall thingies?

If the latter, did you register the host PC or the guest PC as the user of the paywall?

For NAT to work I'd expect you have to register the host PC.
N7
Posts: 6
Joined: 14. Aug 2019, 15:44

Re: No VM internet access when changing WiFi networks

Post by N7 »

It's one of those that when you choose the hotel Wifi, it takes you to a web page and you simply click "accept" to access the internet. No password required on the connection itself.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: No VM internet access when changing WiFi networks

Post by scottgus1 »

OK, pick one guest that you switched to NAT and can't get internet access. Please shut down (not save-state) the guest from within the guest's OS. Then reboot the guest, log in, try the internet. If internet fails again:

Please run the command "ifconfig" and copy the output to your forum post. Shut down the guest again (not save-state).

Also post the output of "ipconfig /all" from your host OS.

Right-click the guest in the main Virtualbox window and choose Show Log. Zip and post the "Vbox.log". Also right-click the guest and choose Show In Explorer, then zip and post the guest's .vbox file. Please use the forum's Upload Attachment tab to post the files.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: No VM internet access when changing WiFi networks

Post by mpack »

Don't you have a mobile hotspot feature in your phone? That ought to be simpler than fighting the hotel firewall.
N7
Posts: 6
Joined: 14. Aug 2019, 15:44

Re: No VM internet access when changing WiFi networks

Post by N7 »

As part of running those commands and looking at the output, I was reminded that I'm on a VPN (for work). Sorry! I turned off the VPN and the VM with NAT was indeed able to access the internet. The Bridged Adapter one was not. So at this point I assume I could just NAT them or choose NAT network and I should be good on any Wifi when VPN is off. It is interesting that the Bridged Adapter one does have internet access when VPN is on from my home wifi.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: No VM internet access when changing WiFi networks

Post by scottgus1 »

Ah, yes, good ol' VPN. Those things rule with an iron fist...
You have a good wifi combination at home. It's a toss of the dice wherever you are whether Bridged will work over Wi-fi. NAT & NAT network should work all the time.
N7
Posts: 6
Joined: 14. Aug 2019, 15:44

Re: No VM internet access when changing WiFi networks

Post by N7 »

Thanks a lot scottgus1!
Post Reply