<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sei_O</title>
    <description>The latest articles on DEV Community by Sei_O (@sei_o).</description>
    <link>https://dev.to/sei_o</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4081680%2F4d117f8e-08f7-48bc-a826-31c76ac16dbf.png</url>
      <title>DEV Community: Sei_O</title>
      <link>https://dev.to/sei_o</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sei_o"/>
    <language>en</language>
    <item>
      <title>Network Configuration for Oracle VirtualBox</title>
      <dc:creator>Sei_O</dc:creator>
      <pubDate>Sun, 11 Oct 2026 20:41:23 +0000</pubDate>
      <link>https://dev.to/sei_o/network-configuration-for-oracle-virtualbox-4717</link>
      <guid>https://dev.to/sei_o/network-configuration-for-oracle-virtualbox-4717</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This article intended for my homelab, how to ensure network in Oracle VM VirtualBox. The reason of worte the article, I want to note a step by steps configuration and I hope someone who reads this article to help your learning.&lt;/p&gt;

&lt;p&gt;Oracle VirtualBox is a useful virtual machine sandbox for work and testing several purposes. Depending on the work and testing purposes, we need to consider the network between VMs and HostOS. Because if you are using Bridge Adapter to connect to Internet or HostOS it could also be seen on Local Area Network.&lt;/p&gt;




&lt;h2&gt;
  
  
  Network Settings and Overview
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;NAT&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect to the outside via the host PC's NIC&lt;/li&gt;
&lt;li&gt;Separate network for each virtual machine&lt;/li&gt;
&lt;li&gt;Virtual machines are not visible from the host PC but are accessible via port forwarding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;NAT Network&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unlike NAT, which operates on a per-virtual-machine network basis, this setup allows multiple virtual machines to belong to the same network and access each other.&lt;/li&gt;
&lt;li&gt;However, port forwarding is still required for access from the host PC.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Bridged Adapter&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Joins the LAN to which the host PC belongs via the host PC's NIC.&lt;/li&gt;
&lt;li&gt;Allows access to the virtual machine not only from the host PC but also from other PCs on the LAN.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Host-Only Adapter&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does not connect to the host PC's NIC; external connectivity is not possible.&lt;/li&gt;
&lt;li&gt;Establishes a network using the virtual machine and a virtual NIC, allowing mutual access between the virtual machine and the host PC via the virtual NIC.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Internal Network&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Establishes a network exclusively between virtual machines.&lt;/li&gt;
&lt;li&gt;No DHCP service is available, so settings such as IP addresses must be configured individually.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Cloud Network&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can connect to Oracle Cloud Infrastructure (OCI), access its resources, and manage VMs in the cloud.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why avoid Bridged Adapter
&lt;/h2&gt;

&lt;p&gt;The Bridged Adapter works by secondary network segment directly to your physical network.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F45jxziw2iomw7ipm4e5w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F45jxziw2iomw7ipm4e5w.png" alt=" " width="378" height="392"&gt;&lt;/a&gt;&lt;br&gt;
Figure 1. Architecture Network Diagram of Bridged Mode&lt;/p&gt;

&lt;p&gt;You can use the Bridged Adapter for accessing the internet, but it's still reachable by another PC on internal network (Normally a packet that send by another PC to VM will denied by firewall of the HostOS). &lt;/p&gt;

&lt;p&gt;Of course, you can use the Bridged Adapter when exposing the VM to external and that requires you to ensure that the firewall is secured.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Reason for the Coexistence of NAT and Host-Only Adapter
&lt;/h2&gt;

&lt;p&gt;Best practice of the network configuration is combined NAT/NAT Network and Host-Only Adapter. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpu0jkgt00j3sah6o9ihy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpu0jkgt00j3sah6o9ihy.png" alt=" " width="512" height="512"&gt;&lt;/a&gt;&lt;br&gt;
Figure 2. Architecture Network Diagram of NAT and Host-Only Adpater&lt;/p&gt;

&lt;p&gt;By using NAT, VirtualBox built-in DHCP server does automatically assign an IP address, a Default Gateway and a DNS server to the VM. However, the GuestOS and HostOS still cannot communicate with each other that menas you cannot accessing SSH via WSL2, Visual Studio Code, Teraterm etc. The Host-Only Adapter can solve this problem by assigning a static IP address to the VM.&lt;/p&gt;

&lt;p&gt;Additionally, this network configuration might be good practiced to work a mini-cluster homelab Kubeadm (A low-level tool built to bootstrap minimum viable Kubernetes) on VirtualBox.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installation of NAT and Host-Only Adapter
&lt;/h2&gt;

&lt;p&gt;Firstly, You need to create both NAT and Host-Only Adapter in installation of VirtualBox before modify the network settings in the GuestOS.&lt;/p&gt;

&lt;p&gt;Select "Network tab" (1) then click "Create" (2) in Host-only Networks tab to add a new VirtualBox Host-Only Adapter there you will receive a manually assigned IPv4 address 192.168.x.1 and IPv4 Network Mask 255.255.255.0 in the adapter (3), see the figure below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2c7za1r5hjqj8hjhng5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2c7za1r5hjqj8hjhng5g.png" alt=" " width="800" height="421"&gt;&lt;/a&gt;&lt;br&gt;
Figure 3. Network Tab in VirtualBox&lt;/p&gt;

&lt;p&gt;If you want to use a dynamically assigned IP Address, select the DHCP Server tab next to the Adapter tab then check a box to be enabled that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd2g5hg6p2uu8ycrl6yy8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd2g5hg6p2uu8ycrl6yy8.png" alt=" " width="357" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 4. DHCP Server Tab in Host-Only Adapter&lt;/p&gt;

&lt;p&gt;Secondly, Move to the target VM and select the Network tab, then change a NIC type to NAT (Normally, the NIC is automatically selected by default settings). Next, switch to the Adapter 2, check the box to be enabled NIC. Select the Host-Only Adapter and a specified Ethernet Adapter that you created Host-Only Adapter Ethernet Adapter in first steps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyd3uwhzx5jhmico9dkzu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyd3uwhzx5jhmico9dkzu.png" alt=" " width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 5. Network Settings in the VM&lt;/p&gt;

&lt;p&gt;Assign IP address for the GuestOS is it can use nmtui, nmcli or other tools for the network configuration. &lt;/p&gt;

&lt;p&gt;The following exempeles uses modify the network settings.&lt;/p&gt;

&lt;p&gt;For nmcli:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nmcli connection modify &lt;span class="o"&gt;{&lt;/span&gt;Connection Name&lt;span class="o"&gt;}&lt;/span&gt; ipv4.method manual ipv.4addresses &lt;span class="o"&gt;{&lt;/span&gt;IP Address&lt;span class="o"&gt;}&lt;/span&gt; ipv4.gateway &lt;span class="o"&gt;{&lt;/span&gt;Gateway&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;#Opt. Create Ethernet Connection if the GuestOS is not allocated Ethernet in the network settings.&lt;/span&gt;
nmcli connection add &lt;span class="nb"&gt;type &lt;/span&gt;Ethernet con-name enp0s8 ifname &lt;span class="s2"&gt;"*"&lt;/span&gt; 802-3-ethernet.mac-address &lt;span class="o"&gt;{&lt;/span&gt;MAC Address&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The MAC Address can be found in the VM's Network Settings in Oracle VirtualBox, see the Figure 5&lt;/p&gt;

&lt;p&gt;For nmtui:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nmtui
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the terminal and enter nmtui then select the Edit a connection to configure network. In addition, you can create a new adapter in nmtui. It's more easily to create the adapter than using nmcli.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F61p1lhrite4e28x925lh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F61p1lhrite4e28x925lh.png" alt=" " width="608" height="689"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 6. Edit Connection Screen in nmtui&lt;/p&gt;

&lt;p&gt;Assign IP Address, Gateway, then restart nmcli Connection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nmcli connection down enp0s8
nmcli connection up enp0s8

&lt;span class="c"&gt;#View your Network Configuration&lt;/span&gt;
ip addr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The below figure shows results for the IP Address and Ethernet after modified the GuestOS's Network Configuration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsdbt5ihytm77j3ab1fa4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsdbt5ihytm77j3ab1fa4.png" alt=" " width="800" height="388"&gt;&lt;/a&gt;&lt;br&gt;
Figure 7. Reslut of ip Command in the GuestOS RHEL10&lt;/p&gt;

&lt;p&gt;Try remote access via SSH with Teraterm, VScode or other Open-source terminal emulator program, then you can see it works.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>networking</category>
      <category>virtualmachine</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
