A Bridge to the Cloud...

Oracle VM VirtualBox: Networking options and how-to manage them

Simon Coter
Senior Manager, Oracle Linux and Virtualization Product Management

VirtualBox.pngStarting from the great blog article that Fat Bloke wrote in the past on this important Oracle VM VirtualBox component, I'm going to refresh the same for VirtualBox 5.1.

Networking in VirtualBox is extremely powerful, but can also be a bit daunting, so here's a quick overview of the different ways you can setup networking in VirtualBox, with a few pointers as to which configurations should be used and when.

Oracle VM VirtualBox 5.1 allows you to configure up to 8 virtual NICs (Network Interface Controllers) for each guest vm (although only 4 are exposed in the GUI) and for each of these NICs you can configure:

  1. Which virtualized NIC-type is exposed to the Guest. Options available are:
    • PCnet-PCI II (Am79C970A)
    • PCnet-Fast III (Am79C973)
    • Intel PRO/1000 MT Desktop (82540EM)
    • Intel PRO/1000 T Server (82543GC)
    • Intel PRO/1000 MT Server (82545EM)
    • Paravirtualized network adapter (virtio-net)
  2. How the NIC operates with respect to your Host's physical networking. The main modes are:

The choice of NIC-type comes down to whether the guest has drivers for that NIC.  VirtualBox, suggests a NIC based on the guest OS-type that you specify during creation of the vm, and you rarely need to modify this.

But the choice of networking mode depends on how you want to use your vm (client or server) and whether you want other machines on your network to see it. So let's look at each mode in a bit more detail...

Network Address Translation (NAT)

This is the default mode for new vm's and works great in most situations when the Guest is a "client" type of vm. (i.e. most network connections are outbound). Here's how it works:

NAT Networking

When the guest OS boots,  it typically uses DHCP to get an IP address. VirtualBox will field this DHCP request and tell the guest OS its assigned IP address and the gateway address for routing outbound connections. In this mode, every vm is assigned the same IP address ( because each vm thinks they are on their own isolated network. And when they send their traffic via the gateway ( VirtualBox rewrites the packets to make them appear as though they originated from the Host, rather than the Guest (running inside the Host).

This means that the Guest will work even as the Host moves from network to network (e.g. laptop moving between locations), and from wireless to wired connections too.

However, how does another computer initiate a connection into a Guest?  e.g. connecting to a web server running in the Guest. This is not (normally) possible using NAT mode as there is no route into the Guest OS. So for vm's running servers we need a different networking mode....

NAT Networking characteristics:

  • Guests sit on own private LAN
  • VirtualBox acts as a DHCP Server
  • VirtualBox NAT engine translates addresses
  • Destination servers see traffic originating from VirtualBox host
  • No configuration needed on Host or Guest
  • Great when guests are clients
  • Not good for guests as servers

Bridged Networking

Bridged Networking is used when you want your vm to be a full network citizen, i.e. to be an equal to your host machine on the network; in this mode, a virtual NIC is "bridged" to a physical NIC on your host.

The effect of this is that each VM has access to the physical network in the same way as your host. It can access any service on the network such as external DHCP services, name lookup services, and routing information just as the host does. Logically, the network looks like this:

Bridging to wired LAN

The downside of this mode is that if you run many vm's you can quickly run out of IP addresses or your network administrator gets fed up with you asking for statically assigned IP addresses. Secondly, if your host has multiple physical NICs (e.g. Wireless and Wired) you must reconfigure the bridge when your host jumps networks.

So what if you want to run servers in vm's but don't want to involve your network administrator? Maybe one of the next 2 modes is for you...or maybe a combination of more options, like one NAT vNIC + 1 Host-only vNIC.....

Bridged Networking characteristics:

  • VirtualBox bridges to Host Network
  • Good for clients or server guests
  • Consumes IP addresses
  • May involve configuration of guest
  • Best for production environments 

Internal Networking

When you configure one or more vm's to sit on an Internal network, VirtualBox ensures that all traffic on that network stays within the host and is only visible to vm's on that virtual network. Configuration looks like this:

Configuring Internal Networks

The internal network ( in this example "intnet" ) is a totally isolated network and so is very "quiet". This is good for testing when you need a separate, clean network, and you can create sophisticated internal networks with vm's that provide their own services to the internal network. (e.g. Active Directory, DHCP, etc). Note that not even the Host is a member of the internal network, but this mode allows vm's to function even when the Host is not connected to a network (e.g. on a plane).

Note that in this mode, VirtualBox provides no "convenience" services such as DHCP, so your machines must be statically configured or one of the vm's needs to provide a DHCP/Name service.

Multiple internal networks are possible and you can configure vm's to have multiple NICs to sit across internal and other network modes and thereby provide routes if needed.

But all this sounds tricky. What if you want an Internal Network that the host participates on with VirtualBox providing IP addresses to the Guests? Ah, then for this, you might want to consider Host-only Networking...

Internal Networking characteristic:

  • Guests can see other guests on same internal network
  • Host cannot see internal network
  • Network configuration needed
  • Functions even when Host disconnected
  • Can be used in conjunction with Bridged
  • Good for multi-tier solutions

Host-only Networking

Host-only Networking is like Internal Networking in that you indicate which network the Guest sits on, in this case, "vboxnet0":

All vm's sitting on this "vboxnet0" network will see each other, and additionally, the host can see these vm's too. However, other external machines cannot see Guests on this network, hence the name "Host-only".

Logically, the network looks like this:

Host-only networking

This looks very similar to Internal Networking but the host is now on "vboxnet0" and can provide DHCP services. To configure how a Host-only network behaves, look in the VirtualBox Manager...Preferences...Network dialog:

Configure Host-only NetworksDHCP Server

Host-Only Networking characteristics:

  • VirtualBox creates a private internal network for guests and host
  • Host sees a new software NIC
  • VirtualBox provides a DHCP server
  • Guests cannot see outside world
  • Guests function even when host disconnected
  • Great for development

Port-Forwarding with NAT Networking

Now you may think that we've provided enough modes here to handle every eventuality but here's just one more...

What if you cart around a mobile-demo or dev environment on, say, a laptop and you have one or more vm's that you need other machines to connect into? And you are continually hopping onto different (customer?) networks.

In this scenario:

  • NAT - won't work because external machines need to connect in.
  • Bridged - possibly an option, but does your customer want you eating IP addresses and can your software cope with changing networks?
  • Internal - we need the vm(s) to be visible on the network, so this is no good.
  • Host-only - same problem as above, we want external machines to connect in to the vm's.

Enter Port-forwarding to save the day!

  1. Configure your vm's to use NAT networking;
  2. Add Port Forwarding rules;
  3. External machines connect to "host":"port number" and connections are forwarded by VirtualBox to the guest:port number specified.

For example, if your vm runs a web server on port 80, you could set up rules like this: 

Port-forwarding Rules

...which reads: "any connections on port 8080 on the Host will be forwarded onto this vm's port 80".

 This provides a mobile demo system which won't need re-configuring every time you connect your laptop to a different LAN/Network.


VirtualBox has a very powerful set of options allowing you to set up almost any configuration your heart desires. 
For more information, check out the VirtualBox User Manual on Virtual Networking.

Join the discussion

Comments ( 82 )
  • Nirmal Saturday, June 3, 2017
    Hi Simon Coter,

    Thanks for the detailed explanation. I am curious to know which option should we need to go to setup the following.

    - Disable Internet on Host OS for Security Reasons
    - Enable Internet for any Guest OS VM

  • Simon Tuesday, June 6, 2017
    Hi Nirmal,

    to get this you should use "Bridged Interfaces" for your VMs.
    You can work on your own LAN DHCP server and decide which IP addresses / MAC addresses can have internet access and which not.
    An other alternative could be to use an external proxy-server to get internet access and the same will be configured, client-side, only on VMs.
    There is no option to get VirtualBox managing host OS internet access.

  • Nirmal Saturday, July 1, 2017
    Thanks Simon.

    I have tried your first suggestion and it works perfectly.

  • mou reg Sunday, July 2, 2017
    Dear Simon,
    how can manage the other 4 adapters which is not shown in virtualbox settings.
    i need to change modes for those 4 .
  • Simon Monday, July 3, 2017
    Hi Mou,

    you have to use the "VBoxManage" CLI.
    You can see VirtualBox documentation at:


    and some examples at:



  • André Tuesday, July 4, 2017
    Hi Simon,

    How good this article, I need help.

    What is the appropriate setting for the scenario:

    Host: running "Primavera P6" (port 8203), WebLogic, Oracle Linux 7;
    Guest: Windows7 / Internet Explorer connects to host port 8203.

    Thank you

  • Simon Wednesday, July 5, 2017
    Hi Andre,

    the proper solution, based on your requirements, is to use "Host-Only Network" where both the Host and the Guest will have an IP address on the same subnet.

  • Alex Saturday, July 8, 2017
    How can I setup next:
    1) Guests can see each other and get always same IP so that them can communicate each other with no issues.

    2) Guests should get same IP, doesn't matter the way host connects to internet home wifi(any network range), work wifi(any network range), tethering 3g/4g wifi( 192.168.43.*), network cable(any network range)
    3) Host can see any guest.
    4) Need a switch to turn of/on access to internet for the guests. Ideally if this could be done on per guest basis.
    5) Guests should be dumb and have no idea how to connect to internet for the case if HOST connects to wifi using login/password.
    6) Guests should not reserve an IP from external DHCP(from which host gets an IP)
  • Simon Monday, July 10, 2017
    Hi Alex,

    for all your requirements above you should create and use your own custom NAT-Network.
    This configuration will cover points 1,3,5,6.
    For point (2) you need to configure your own fixed ip address within the vm, part of the subnet defined for your own NAT-Network.
    For point (4) you need to find a solution on your host-system.

  • Manohar Friday, August 4, 2017
    Hi, Can you help me to sync the datetime between host and guest running on oracle VM virtual box.
  • Simon Friday, August 4, 2017
    Hi Manohar,

    please post your question on our forum at https://forum.virtualbox.org with all the details on the issue you are encountering.
  • Shamsul B Thursday, September 21, 2017
    Hi Simon,

    I am currently setting up several Debian VMs as servers.
    All with default NAT address (
    Any easy way to ensure all servers get the latest update by issuing a simple command at the VBox GUI or command line?

  • Simon Thursday, September 21, 2017
    Hi Shamsul,

    if you want to execute commands within your VMs you can check following VirtualBox CLI option:

    # VBoxManage guestcontrol -help

    You need to install VirtualBox guest-addition within your VMs.

  • SULTAN AHMED Sunday, November 12, 2017
    I have windows 10 in my machine, I also installed vitualbox to learn Linux. Now i would like to connect virtualbox to my machine wifi. I try to get help from online search but internet did not connect to virtualbox. Could you help me to sort out this issue. Please share step.
  • David Mann Saturday, November 25, 2017
    Thanks for this post, the old FatBloke article was slowly fading away and finally gone from the original link... Good concise resource for jogging my memory when I need to think about VirtualBox networking!
  • Simon Monday, November 27, 2017
    Hi Ahmed,

    if you want to get internet on your VM, just use the NAT vnic type and do not worry about wifi or wire connection, the VM will always rely on the host OS to get outside.

  • mac Wednesday, November 29, 2017
    Are these the same ip addresses i have to use in my network.
  • Simon Wednesday, November 29, 2017
    Hi Mac,

    no, you can use the subnet you prefer for your network configuration.
    Only the default NAT has its proper network and you should configure the VM with DHCP.

  • Igor Z. Friday, December 8, 2017
    Hi Simon,

    I have ifcfg-enp0s3 configurated like this:
    and it works.
    But if I want to change subnet like this:

    it does not work. So the question is how to change subnet ?
  • Simon Monday, January 8, 2018
    Hi Igor,

    to have your proper subnet you should use "Custom NAT" or "Host-Only" networks and, over there, define your subnet. Once did, you'll be able to configure your custom ip address within the VM and have it correctly working.

  • Justin Thursday, January 11, 2018
    Thank you for the great post.

    In section "Host-only Networking" you show the Preferences dlg and the UI shows both NAT networks and Host-only networks. I'm using VB 5.2.2 and it shows only NAT networks. How do I create/configure host-only nets?

    Also, how do you configure multiple internal networks? Just by creating a new name in the Name drop list?

  • Simon Friday, January 12, 2018
    Hi Justin,

    related to "Host-Only" you have to use "Global-Tools -> Host Network Manager" in the upper right of VirtualBox GUI.
    For Internal-Networks just name them as you need (see https://www.virtualbox.org/manual/ch06.html#network_internal for further details).

  • Justin Friday, January 12, 2018
    Thanks, Simon. It seems strange that the networking config has been bifurcated. Do you know the logic behind this change? Aren't both net types 'global'?

  • Simon Tuesday, January 16, 2018
    Hi Justin,

    yep, also Internal Network is global but its management has been always part of the VM itself.

  • Grzegorz Wednesday, March 14, 2018
    Which The main modes i have to choose, when i want to generate network traffic in my virtualbox from software like scapy, ostinato and capture the traffic with wireshark, but i need server who can reply my traffic.
  • Simon Wednesday, March 14, 2018
    Hi Grzegorz,

    it really depends which type of network communication will happen. If your VM talks with an external host/VM then I would suggest you to used "Bridged" and you can track your network within the VM and on the external host; if you VM talks only with the host OS, you can use NAT or Host-only Network and monitor traffic within the VM and on the VBox vNIC on the host.

  • David Sunday, March 18, 2018
    This is a very informative article, thank you very much for taking the time to put this information together!
  • Ali Tuesday, April 3, 2018
    Hi Simon,

    How am I supposed to get a web address for the VM? I am “hosting” a website on it, and need to know the web address of my VM to see if my site actually shows up.

  • Simon Wednesday, April 4, 2018
    Hi Ali,

    you only know how you've configured your VM and which IP address your VM has. On VirtualBox you can use DHCP or static IP address within the VM; you also have different network types....

  • Shamsul B Monday, April 30, 2018
    Hi Simon,

    Is there a way to edit/view/copy the port forward (PF) rules created in GUI using CLI? I supposed the option could be available in "VBoxManage natnetwork" command line. I have to go back and forth in the GUI/CLI to check my PF rules I created previously.
  • Simon Monday, April 30, 2018
    Hi Shamsul,

    you should be able to see existing rules by "showvminfo" option; example:

    [scoter@area51: ~]# vboxmanage showvminfo ol7-lamp |grep NIC |grep Rule

    NIC 1 Rule(0): name = ssh, protocol = tcp, host ip =, host port = 2222, guest ip = , guest port = 22

    NIC 1 Rule(1): name = tcp8080, protocol = tcp, host ip = , host port = 8080, guest ip = , guest port = 80

  • Shamsul B Friday, May 4, 2018
    Hi Simon,

    I've created a new nat network, namely NatNetwork1 with ssh and http port forwarding rules in it and tied a vm to the new network.

    vboxmanage showvminfo vm | grep NIC shows:
    NIC 1: MAC: XXXXXXX, Attachment: NAT Network 'NatNetwork1', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
    NIC 2: disabled

    The cmd "vboxmanage natnetwork list" will list

    vboxmanage natnetwork list shows:
    NAT Networks:

    Name: NatNetwork
    IPv6: No
    Enabled: Yes

    Name: NatNetwork1
    IPv6: No
    Enabled: Yes

    What command to see the details of the NatNetwork1 (including PF rules)

    I would expect something like "vboxmanage natnetwork list NatNetwork1 --showdetails" or someting like that. Currently it has the following options only.

    vboxmanage natnetwork

    VBoxManage natnetwork add --netname
    [--dhcp on|off]
    [--port-forward-4 ]
    [--loopback-4 ]
    [--ipv6 on|off]
    [--port-forward-6 ]
    [--loopback-6 ]

    VBoxManage natnetwork remove --netname
    VBoxManage natnetwork modify --netname
    [--network ]
    [--dhcp on|off]
    [--port-forward-4 ]
    [--loopback-4 ]
    [--ipv6 on|off]
    [--port-forward-6 ]
    [--loopback-6 ]

    VBoxManage natnetwork start --netname
    VBoxManage natnetwork stop --netname
    VBoxManage natnetwork list []
  • Rod Friday, May 18, 2018
    Simon, thanks for providing an excellent article on the subject! I am a DBA installing Galera Cluster on 3 VM machines (running on Windows 10). The requirements is to have static IP addresses for all 3 nodes, be able to fetch os and rdbms software from the internet and also connect to all nodes via putty (from Windows). I have tried different combinations and could not accomplish the 3rd request. VM is not visible (unable to ping) from Windows hosting it. Please advise on solution. Thanks!
  • Simon Monday, May 21, 2018
    Hi Rod,

    you should create your own customer NAT network.
    With this option your host will be able to reach all the VMs, you can use fixed IP addresses you want and if a service running on the VMs need to be exposed outside you can use port-forwarding.

  • Curtis Monday, June 4, 2018
    Hi Simon,

    I want to build a virtual box on a Domain connected PC.

    My requirements are for the virtual box to be isolated from the Domain so it cannot connect to the Host or be contactable from the Host or any machine on the Domain.

    Which option do I choose to configure the Virtual Box?
  • Simon Monday, June 4, 2018
    Hi Curtis,

    for your requirement best choice is "Host-Only".
    With "Host-Only" network your VMs won't have any access outside. The only communication granted will be between your Host and your VMs.

  • Vlad Tuesday, June 5, 2018
    Hi Simon,

    I would have a question on how should I configure my VM in the following situation:
    I have a Windwos 2008 application Server running on my PC Virtual Box, and I want to establish a connection between a tablet running on Windows 10 where I have to setup a client. The tablet has to reach the Server egateway, but it is not. I have an external Wifi adapter to which both my PC and the Tablet are connected.
    What configuration should I chose for the Windows 2008?

    Thank you and best regards,
  • Simon Tuesday, June 5, 2018
    Hi Vlad,

    if you want to get your VM directly communicating outside (so to your tablet on the same WiFi connection) you should use a "Bridged Adapter".

  • Vlad Tuesday, June 5, 2018
    Hi Simon,

    Thank you for the quick reply. What should I chose from the drop-down list under 'Name', is there any specific option or just the ' Intel Dual Band Wirelss'

    Best regards,
  • Simon Tuesday, June 5, 2018

    you should choose the Network Adapter that has the option to communicate with your Tablet; I cannot know which device(s) you have on your env.

  • Gareth Friday, June 8, 2018
    Sometimes you google something looking for an answer, and get half answers. This is not the case here.

    Thanks for a great article that helped me figure out exactly what network setup I needed!
  • katie p Tuesday, June 12, 2018
    Hi Simon, great article. It helps me alot. But pls, can you help me with my issue? I have Oracle virt. box and 2 centos 6,9 in it. I need to create NFS server. I have Nat interface for connection to inet. But with which interface should i connect centoses so they have different IP addr. each? So I can make from one centos nfs server a from second one ..client. ? thanx.
  • Simon Tuesday, June 12, 2018
    Hi Katie,

    you should add a second "Host-Only" vNIC to each VM and configure a static IP for both of them.
    The "NAT" vNIC has to remain the default-gateway for your VMs while the "Host-Only" will be used for internal communication between them.

  • Shamsul B Thursday, June 28, 2018
    Hi Simon,

    In my earlier post on Friday, May 4, 2018, asking about the detailed info on VMs and its port forward setup, I have finally found the answer. The available command is: vboxmanage list natnets. The output of the command shows the details of the Port-forwarding rules.
    Your suggested command: vboxmanage showvminfo ol7-lamp |grep NIC |grep Rule
    does not provide intended output of the porf forwarding rules.

  • Sujeet Friday, July 27, 2018
    Hi Simon,

    I have 2 guest vm's on ubuntu which will be running kubernetes master and client. So my requirement is

    1. Access to internet from vm's so that they download sw as required.
    2.communication between vm's for clustering.
    3. Fixed IP address to each vm.
    4. Communication from host to guest and reverse.

    My laptop runs windows 8 and I connect to internet thru a wireless router.

    When do we configure the network part after creating vm's and before installing the OS or later.

  • Simon Sunday, July 29, 2018
    Hi Sujeet,

    for this purpose you can create your dedicated "NAT Network" and get both the VMs on it.
    By using the your custom NAT both VMs will be able to talk each other and, at the same time, reach the web outside (by leveraging your host).
    An other option can be to get 2 different vNIC, one Host-Only dedicated to the internal traffic between the two VMs and one Bridged to reach outside.

  • Sujeet Monday, July 30, 2018
    Hi Simon,

    Thanks for the quick response. The problem with NAT setup is that both VM's get the same ip address and hence cannot become part of the cluster as master and slave. Other problem I have is that I cannot get the fixed ip address working for host-only setup and I am forced to used dhcp .
  • Simon Monday, July 30, 2018
    Hi Sujeet,

    you have to create your own NAT network (not use the default one available); an example on how-to create a NAT network is available here:


    Once done you can create your own "port forwarding" rules by using the command line utility "vboxmanage".

  • Vibhas Tuesday, July 31, 2018
    Hi Simon,

    Thanks for providing such insightful info on vbox networking modes.
    I need your help on the below scenario :-
    I have windows 10 as my host and some web-server(port 8443) running inside a VM(debian) whose interface is configured with static ip :
    Now, we need to access this web-server from external devices using host-ip:8443
    As per my understanding the best netwroking mode to use for this scenario would be NAT Port-Forwarding, but the problem is with the static ip(
    I tried adding following rule :-
    Name Protocol H-IP H-Port G-IP G-Port
    Rule1 TCP blank 8443 blank 8443

    I tried the above rule with changing the default network range from 10.0.2.X/16 to 172.16/16
    But even then it is not working.
    Is there any way that we can access the web-server with its static-ip using host-ip from external devices ?
    Any help on this will be much appreciated.

  • Simon Tuesday, July 31, 2018
    Hi Vibhas,

    you have two options here: use the default NAT available on VirtualBox and manage the port forwarding from the GUI or use a custom NAT Network and implement the port forwarding with "VBoxmanage" on the host (VBoxManage.exe on Windows).
    The command to create a port-forwarding rule on your custom NAT is, for example:

    # VBoxManage natnetwork modify --netname "yourNatNetwork" --port-forward-4 "myapp:tcp:[]:8443:[vm-ip]:8443"

  • pavlos Thursday, August 2, 2018
    Host: windows 10, Start VirtualBox (I have 5.2.12)

    ===== create first VM =====
    name: ipfire
    adapter1: bridged
    adapter2: host-only adapter
    install ipfire 2.19 core 120
    configure red0 as bridge, DHCP
    configure green0, static,, gw

    red0 gets (from Zentyal), green0 gets
    from host, and gui shows up

    ===== create second VM =====
    name: winxp
    nic1: host-only adapter
    configure network as DHCP, it will get
    (VB has a DHCP server enabled for guests)

    ===== logon to ipfire
    pings (winxp VM),, and resolve names (ping he.net)

    ===== logon to winxp
    pings (ipfire VM), but cannot ping or resolve names

    I was hoping that all traffic from winxp would be routed to ipfire and then outside.
    ( -> -> -> -> Net)

    Thank you, Paul
  • Simon Thursday, August 2, 2018
    Hi Paul,

    two things you should check on your env:

    1. Routing on VMs (you do not need to configure as gateway); all VMs on this subnet will be able to talk each-other and also to reach

    2. Check that on "Bridged" interface, under "Advanced Options" you have "Allows All".

  • AleX Sunday, September 9, 2018
    Hi Simon!

    I have an issue with bridge network on my Kali Linux v-machine, hosted on Linux Mint. I need Kali to operate as individual device in network, but after trying every solution that I found on the internet, nothing helped - host OS doesn't see Kali and Kali doesn't connect. What should I do?

    Sincerely, Alex
  • Simon Monday, September 10, 2018
    Hi Alex,

    you should use "Bridge Networking" and point to the correct physical NIC (wired or wifi).
    After that you should verify that under "Advanced" section you also have "Allows all".
    Your VM should get a public IP from DHCP (or you have to assign a static one) and from there your host and guest VM should also talk each other.

  • Christopher Medina Thursday, October 25, 2018
    I need all the vms to connect to each other, get dhcp from virualbox and reach the Internet. How would I accomplish this? Thanks
  • Simon Friday, October 26, 2018
    Hi Christopher,

    you should use your custom NAT network.
    See "https://www.virtualbox.org/manual/ch06.html#network_nat_service" VirtualBox documentation.

  • Nicu Monday, December 24, 2018

    I have the following schema:
    VM1(NAT network) -> (NAT network)ClearOS - gateway mode -(internal network) -> (internal network)VM2. How can I ping from VM1 to VM2?
  • Simon Thursday, December 27, 2018
    Hi Nicu,

    if both VMs are on the same internal-network, you should be able to ping on that subnet.

  • Xinwen Fu Tuesday, February 5, 2019
    Is your first picture about Network Address Translation (NAT) wrong? All the VMs have the same IP?

    Xinwen Fu
  • Simon Thursday, February 7, 2019
    Hi Xinwen,

    no, the picture is correct.
    While using "NAT" you always have a sort of "fake IP" for your VM that entirely relies on the host.
    If you want a real NAT, you have to create your NAT Network and, over there, you won't be (obviously) able to use the same IP from two different VMs.

  • malick Wednesday, March 13, 2019
    I have a linux host server with 4 nics. This host get IP address / internet from DSL router. There are 3 linux VMs on this host.

    What I want is to bind each VM to a nic so it can get IP addressing / internet from DSL router.Do not want virtual box to provide IP addressing to VMs.

    How would you recommend I proceed?
  • Simon Wednesday, March 13, 2019
    Hi Malick,

    you should use "Bridged" devices and those have to be associated to the physical NIC your host is using to get internet access.

  • Mark Havermans Thursday, April 11, 2019
    Hi Simon,

    I'm a teacher and want to prohibit my pupils from going to the internet with the vm's through the host. My network and system administrators are reluctant to have VirtualBox installed for network security reasons and I have to convince them that it's safe. Is there a way that the only choosable (and configurable) networking configuration is 'internal networking'? If not in VirtualBox configurable, are there Windows Group policies for VirtualBox to force this configuration of internal only?
    I would be so grateful if this is possible in any way!

    Mark Havermans
  • Simon Friday, April 12, 2019
    Hi Marc,

    unfortunately Networking Capabiltiies are part of the VirtualBox core and cannot be stripped away from the same.
    Related to the Windows Group Policies, I'm not aware of any option coming from the OS for this target.

  • Peter Sunday, April 21, 2019
    Hi Simon.

    Great article...

    Maybe i didn't see it in the comments, so here goes.

    As part of a robotics project my group and i are using a raspberry pi, an UR5 robot and a PC. These are connected via a LAN. To develop the software i'm using VBox to simulate pi and UR-cap.

    I'm wondering, is the best way to simulate the Real Life network a HOST-ONLY network, or should i use a different solution?
    For the accual network i need to use some kind of switch. Can that be implemented in the virtual network?
  • Simon Monday, April 22, 2019
    Hi Peter,

    I think that the best option could be to use "Bridged Network" so, theoretically, you could use the same network your devices will use.

  • mohammad Sunday, May 19, 2019
    i use bridge mode, i able to ping all my LAN from vm, but other communication not possible "other port"
    for example can't take any computer on lan remote from vm, can't login by domain user on vm.
    what is the problem ?
  • Simon Wednesday, May 22, 2019
    Hi Mohammad,

    I think that the only missing piece is to expand the "Advanced Section" and select "Allows All".

  • wavef0rm Wednesday, June 5, 2019
    I'm configuring an ubuntu 18.04.2 server that is going to run two ubuntu 16.04.2 server VMs. The physical machine has three NICs, and I want to configure so that only 1 NIC is accessible to the host, 1 NIC is only used by VM1, and the third NIC is only used by VM2. Is this possible? Also, ideally, when I unplug a network cable from the host, it should not be able to communicate with the VMs.
  • Simon Wednesday, June 5, 2019
    Hi wavef0rm,

    just use NIC1 for your host and, then, while creating VM1 configure a bridged network interface to NIC2 and while creating VM2 configure a bridged interface to NIC3.

  • Wyckham Seelig Sunday, June 16, 2019
    I am using a virtual machine set up by ansible that I downloaded from drupalvm. It works fine, but I have two questions: (1) I notice that the virtual machine has two adapters, one NAT with port forwarding, and the other host-only. How does VirtualBox manage to get packets to the right adapter? Is there some kind of switch or router in VirtualBox itself that handles this? And (2): the host-only network is called vboxnet0, but I can find no trace of this network on my host machine [A MacBook Pro]. Why not?
  • Simon Tuesday, June 25, 2019

    it's not VirtualBox managing the right adapter, it's the networking of your VM that redirects the traffic based on target to reach out.
    Related to "vboxnet0" you should see it as a device on your host only while host-only network is used.

  • Vinod Gupta Sunday, August 18, 2019
    I have Win 10 host, VB 6.0.10. I created Nat Network with:
    VBoxManage natnetwork add --netname natnet1 --network "" --enable --dhcp on
    and created 2 VMs with RHEL 8, they got IP, 5. Both can ping each other, the host and google.com. However, host can ping none of the 2 VMs. How to make all 3 machines talk to each other?
  • Simon Monday, August 19, 2019
    Hi Vinod,

    did you check if under the "Advanced Options" you have "Allows All" for "Promiscuous Mode" ?

  • PaulD Monday, October 7, 2019

    Is it possible using the 'VBoxManage DCHPServer' to assign a static IP address to a VM? It looks like it but I cannot find any examples on how to use the --options of the command?

    I need to assign a static IP address to a Linux flavoured VM WITHOUT modifying the config files within the VM itself.

    (As I want to be able to switch between 'Adapter 1' (Bridged connection for internet) and 'Adapter 2' (Internal network where just VM talks to each other) by enabling and disabling them based on what is required from the VM.

    Hope you can help.
  • Simon Monday, October 7, 2019
    Hi Paul,

    please, see VirtualBox documentation at https://docs.oracle.com/cd/E97728_01/E97727/html/vboxmanage-dhcpserver.html .
    That said, if you just execute "vboxmanage dhcpservjer" you will see all the options available for this command.

  • Adam Sunday, November 10, 2019
    Hello sir,

    I have two machines, one red hat server and my kali machine. I need to test the red hat server with my kali machine, for this reason both machines need to be able to communicate between them, but I also need an internet connection on both vms for the purpose of the test. Everything works perfect except for the internet when I run it as an internal network, but everything goes down the drain whether I bridge the vms into my network, or when I try to use the NAT network. They can't ping each other, and when I bridge the kali into my network I actually can't see any device.

    I suspect the red hat server is the cause, since it has a static ip of and a fixed dns.

    Any idea on how I should proceed? :(
  • Simon Monday, November 11, 2019
    Hi Adam,

    for your scope you have two options:

    - Custom NAT
    - Bridged

    and then also verify, under advanced section of the vNIC you have the "Promiscous Mode" enabled.
    That said, an other thing you have to verify is the firewall (i-tables / firewalld) configuration, running on your VMs.

  • Akram Saturday, November 16, 2019
    Hello sir,

    My query is that i want to create an internal network example : int1 with 3 systems.

    Now as per your explanation this 3 systems would be able to communicate with each other provided that host machine network would-not be able to communicate with this internal network.

    Than how to provide internet to this 3 systems in such a way that internal netwok 3 systems would get internet provided that they are still not able to communicate to my host network.

    Please share your guidance on this
  • Simon Thursday, November 21, 2019
    Hi Akram,

    based on your target you could have, for each VM:

    - 1 INT vNIC
    - 1 NAT vNIC (standard NAT, not the custom one)

    and DEFROUTE will be on NAT vNIC.
    With this configuration in-place, your VMs will be able to communicate each other by the INT vNIC and reach Internet by the NAT one.
    Host won'e be able to connect to the VMs.

  • Nino Tuesday, March 10, 2020
    Hi Simon,

    I have oracle VM on my Windows 10 and I have created a server in my oracle VM on CentOS. I have one NAT adapter with port forwarding and one adapter with Host-Only adapter, and static IP. The problem is only I can connect to my server, and the other machines in the room can not? Can you please help me with this problem?
  • Simon Tuesday, March 10, 2020
    Hi Nino,

    why don't you just use "Bridged" network adapter so your VM will be on the same network of all the other physical machines in the room ?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.