Networking- Nat Mode Problem (Host Has No Internet)

This is for discussing general topics about how to use VirtualBox.
Post Reply
king_kangaroo
Posts: 6
Joined: 25. May 2016, 05:42

Networking- Nat Mode Problem (Host Has No Internet)

Post by king_kangaroo »

I am trying to use nat mode for my guest as it seems better for isolating the vm from other machines on the lan.

The host has no internet, I set a static ip and left the gateway blank - this machine is only to host vms.

Host and guest are both windows.

Bridged mode works fine but it's nat mode i'm wanting to use - I am wondering if I have to give the host internet access in order to give the vm internet access also in nat mode - or give the host a proper ip config and use another way to keep it offline.

I'm new to virtualbox so if anyone can offer advice I appreciate it :)
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Networking- Nat Mode Problem (Host Has No Internet)

Post by socratis »

You want to isolate the VM from the other VMs, yet you want the VM to be a peer in the network. I can't think of an easy way to do it, unless I'm not thinking straight.
  • NAT depends on the host's connection. If there's no host internet connection, there's no NAT connection to the internet for your VM.
  • Bridged makes the VM look like another computer in your network.
  • You might (and that's a big might) be able to achieve what you want if you disable the "Workstation", "Server" and the "Computer Browser" services from the VM. I would also disable the "Client for Microsoft Networks" and the "File and Printer Sharing for Microsoft Networks" from each of your VM's network adapters bindings. That could take out the Windows networking aspect out of the equation.
I would not use that VM to test viruses in my local network.
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.
king_kangaroo
Posts: 6
Joined: 25. May 2016, 05:42

Re: Networking- Nat Mode Problem (Host Has No Internet)

Post by king_kangaroo »

socratis wrote:You want to isolate the VM from the other VMs, yet you want the VM to be a peer in the network. I can't think of an easy way to do it, unless I'm not thinking straight.
I have just the one vm so far, as i'm a new user. I'm saying - the host computer is configured to have no internet, I want to keep it offline. The vm is bridged to the machine's wifi - the vm has internet just fine.

I prefer to keep this vm off the same subnet as my host (and other computers on the lan) and I understand the way to do that is to use nat mode rather than bridged, since in bridged mode the vm acts as just another computer on the network, nat mode is more isolated (if i'm right?)

Yet I can't get nat mode working, it must have something to do with the fact that I purposely set a bad gateway in the host's ip config (to keep it offline).

This is a learning exercise for me, understanding the ways that vms can interact with other machines (or not)

Thanks!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Networking- Nat Mode Problem (Host Has No Internet)

Post by socratis »

Apparently, you read not even half of my message:
socratis wrote:NAT depends on the host's connection. If there's no host internet connection, there's no NAT connection to the internet for your VM.
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.
king_kangaroo
Posts: 6
Joined: 25. May 2016, 05:42

Re: Networking- Nat Mode Problem (Host Has No Internet)

Post by king_kangaroo »

socratis wrote:NAT depends on the host's connection. If there's no host internet connection, there's no NAT connection to the internet for your VM.
Sorry I did miss that - thanks alot for your help, I get the picture now.

Well I prefer to keep the host offline, so I guess I need to leave the guest as bridged. I am running xp in the vm, could malware potentially get out of the vm and infect my other computers since they are on the same subnet? Much learning for me to do :mrgreen:
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Networking- Nat Mode Problem (Host Has No Internet)

Post by socratis »

socratis wrote:I would not use that VM to test viruses in my local network.
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