Internet ONLY in guest machine

Discussions related to using VirtualBox on Windows hosts.
Post Reply
atcwalker
Posts: 6
Joined: 30. Nov 2016, 23:55

Internet ONLY in guest machine

Post by atcwalker »

Hi,

Was wondering if someone could advise if I'm able to ONLY allow the internet on the guest virtual machine.

The topics on google have not helped me one bit and i've tried so many setups I begining to believe its not possible.

Hopefully someone knows

Thank you.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Internet ONLY in guest machine

Post by BillG »

Do you mean you want the guest to have Internet access but not the host? That is not easy because the guest has to use the host's NIC to connect to a network. If the host can't see the Internet the guest cannot either. It also depends on how the host is networked.

If you use a USB NIC you can set it up so that only the guest can use it. There are also ways to do it if your host machine is on a LAN (rather than directly connected to the Internet).
Bill
atcwalker
Posts: 6
Joined: 30. Nov 2016, 23:55

Re: Internet ONLY in guest machine

Post by atcwalker »

Correct.
I only want the guest to have internet access.

Currently the PC is connected to a router.

I found notes from a couple years ago(looks like I done this in the past)
My notes aren't complete, but maybe they will provide a clue for someone who knows.
Something about setting the main(host) pc adapter as any random static IP.
atcwalker
Posts: 6
Joined: 30. Nov 2016, 23:55

Re: Internet ONLY in guest machine

Post by atcwalker »

BillG wrote: If you use a USB NIC you can set it up so that only the guest can use it. (rather than directly connected to the Internet).
How could I do this?
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Internet ONLY in guest machine

Post by BillG »

If you are behind a router and on a Windows host, it can be done with no problems. You set the networking mode to bridged so that the guest gets its own IP from the router. From Windows, you go to the host NIC properties and clear all the boxes except "VirtualBox Bridged Networking Driver". Only the vm can use the NIC. (Giving the host an invalid IP or simply clearing its default gateway would also do the job).

If you need to give the host Internet access, just enable them again.
Bill
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Internet ONLY in guest machine

Post by scottgus1 »

One other way, if you have access to the router settings, and you find that something blows up because the host gateway has been cleared, or you need the host to access the local network but just not internet: See if your router has a Parental Access Restrictions page or some such, and block your host's IP address from the internet in the router. A static IP address for the host would help this method to work.
atcwalker
Posts: 6
Joined: 30. Nov 2016, 23:55

Re: Internet ONLY in guest machine

Post by atcwalker »

Thanks for the responses.

@ BillG I still couldn't get it working, but this is what I done.

In host PC I had my NIC and one for VM
I uninstalled the VM from device manager.

Done as you suggested and only had virtual box bridge box checked in win7 network properties.
Then I chose bridge adapter in settings.


PROBLEM SOLVED.......Thanks BillG for helping out!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Internet ONLY in guest machine

Post by mpack »

atcwalker wrote: @ BillG I still couldn't get it working...
I don't see how you could possibly fail. If you disable the host's TCP/IP service on that NIC then there's no way it can make Internet connections. The guest is unaffected because it has its own TCP/IP service on that NIC.
Post Reply