Which networking mode

Discussions about using Linux guests in VirtualBox.
Post Reply
chacham
Posts: 7
Joined: 14. Jan 2014, 18:56

Which networking mode

Post by chacham »

Host OS: Windows 7
Guest OS: Linux (Oracle Developer Days: Database App Development)

I am new to this and am not sure which networking mode to use (or how to configure it.)

The VM is running on my desktop at the office. It cannot be assigned an ip from the office network. The office uses a proxy script (javascript) for browsers. I can read the script to see the ip addresses used.

The host should be able to connect to the the VM.
The VM should be able to connect to the host and the network.
The network does not need to see the VM.

The purpose is to connect to other Oracle servers on the network from the VM. Specifically, to create a DB Link inside the VM's Oracle server to the network's Oracle servers. The other way is not required or desired. (A secondary purpose is to install emacs.)
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Which networking mode

Post by mpack »

Just use NAT mode until you know you need something else. With NAT mode the guest uses the host's internet connection, however it is established. The server will only see the hosts IP address.

One thing you absolutely must not do is attempt to manually assign the hosts IP address to the guest.
chacham
Posts: 7
Joined: 14. Jan 2014, 18:56

Re: Which networking mode

Post by chacham »

Thanx. Been messing around with that. NAT allows the VM to see the network but i cannot seem to connect to the client from the host.
With Host-only, the opposite is true.

I just added both and i can go both ways. Is this how do it? I mean it works, but i am a bit confused.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Which networking mode

Post by noteirak »

chacham wrote:NAT allows the VM to see the network but i cannot seem to connect to the client from the host.
That's by definition of how NAT works. You can only forward specific ports, not see the VM like another machine on your network.
chacham wrote:With Host-only, the opposite is true.
It should works both ways. typically, it doesn't because the host has a firewall that blocks the traffic
chacham wrote:I just added both and i can go both ways. Is this how do it? I mean it works, but i am a bit confused.
That's not how you do it. If you need both ways, either use Host-Only or Bridged, both with proper firewall/antivirus configuration.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Which networking mode

Post by mpack »

But make sure your VM actually needs a full network presence before you spend a lot of time trying to achieve it. In a typical business environment you can only get full network access with the participation of the IT support people. If all you need is to browse the internet then NAT is fine.
chacham
Posts: 7
Joined: 14. Jan 2014, 18:56

Re: Which networking mode

Post by chacham »

noteirak wrote:That's not how you do it. If you need both ways, either use Host-Only or Bridged, both with proper firewall/antivirus configuration.
Well, i do not believe i can do it bridged, as i do not think i can get an ip address for it, nor do i want to have a full network presence. It is only for my use.

If Host-only is the right way to do it, i would like to set it up that way, and learn something in the process. How do i go about finding out if it is a firewall issue (Windows 7's default firewall, i would presume) and if so, how to add the appropriate rules?
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: Which networking mode

Post by socratis »

Or you could add a second NIC, attach the first to NAT and the second to Host-Only. You can have your cake and eat it too... As for the firewall, my guess is that mpack was referring to the guest firewall.
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.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Which networking mode

Post by mpack »

socratis wrote:my guess is that mpack was referring to the guest firewall.
That would be Max (Noteirak). I didn't mention any firewall.
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: Which networking mode

Post by socratis »

Oops... You know what they say about the green people. You mix them all the time ;)
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.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Which networking mode

Post by noteirak »

What an excuse eh :P

From the OP requirements, host-only + NAT is the good way, yes.
I was mererly giving a bit more details but I didn't state what was right for the OP, my bad.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
chacham
Posts: 7
Joined: 14. Jan 2014, 18:56

Re: Which networking mode

Post by chacham »

noteirak wrote:What an excuse eh :P

From the OP requirements, host-only + NAT is the good way, yes.
I was mererly giving a bit more details but I didn't state what was right for the OP, my bad.
Thanx everyone!
Post Reply