🌐 VirtualBox Network Settings Guide

Configure NAT Network for VM Communication

Prepared by - Babashaheer

← Back to Home

📖 What You'll Learn

By default, VirtualBox virtual machines use NAT (Network Address Translation) which allows them to access the internet but NOT communicate with each other. This guide shows you how to create a NAT Network so all your VMs (Windows Server, Ubuntu, ONOS) can talk to each other while still having internet access.

đŸŽ¯ Goal: Create a private network (10.10.10.0/24) where all your lab VMs can communicate with each other and share files.

🔧 Part 1: Creating the NAT Network

First, we need to create a NAT Network in VirtualBox's global settings.

1 Open VirtualBox Network Manager

How to do it:

  • Open Oracle VM VirtualBox
  • Click on File in the menu bar (top-left)
  • Select Tools → Network Manager
  • Alternative: Press Ctrl + H (Windows/Linux) or Cmd + H (Mac)
📸 Screenshot: Take a picture of the Network Manager window opening
💡 Tip: If you can't find "Tools", try clicking on File → Preferences → Network tab (older VirtualBox versions)
2 Create a New NAT Network

How to do it:

  • In the Network Manager window, click on the NAT Networks tab
  • Click the Create button (looks like a green plus icon ➕)
  • A new network called "NatNetwork" will appear in the list
📸 Screenshot: Capture the NAT Networks tab with the newly created network
3 Configure the NAT Network Settings

How to do it:

  • Select the newly created "NatNetwork"
  • Click the Properties button (or double-click the network)
  • Change the settings as follows:

Network Name: Apple

Network CIDR: 10.10.10.0/24

Enable DHCP: ✅ Checked (leave it enabled)

Supports IPv6: âŦœ Unchecked (we don't need this)

  • Click Apply
  • Click OK to close the properties
  • Close the Network Manager
📸 Screenshot: Take a picture showing the network name "Apple" and IP range "10.10.10.0/24"
â„šī¸ What does 10.10.10.0/24 mean?
â€ĸ 10.10.10.0 = Network address (the starting point)
â€ĸ /24 = Subnet mask (255.255.255.0)
â€ĸ This gives you IP addresses from 10.10.10.1 to 10.10.10.254
â€ĸ That's 254 available addresses for your VMs!

đŸ–Ĩī¸ Part 2: Configuring Virtual Machines

Now we need to change each VM's network settings to use the NAT Network we just created.

âš ī¸ Important: Make sure all your VMs are powered off before changing network settings. You cannot change these settings while a VM is running!
4 Open VM Network Settings

For each virtual machine (Windows Server, Ubuntu, ONOS), do the following:

  • In VirtualBox main window, right-click on your VM (e.g., "Windows Server 2019")
  • Select Settings...
  • Click on the Network category on the left
  • Make sure you're on the Adapter 1 tab
📸 Screenshot: Network settings page showing Adapter 1
5 Change from NAT to NAT Network

Here's what you need to change:

❌ BEFORE (Default - VMs can't talk to each other):

Attached to: NAT

✅ AFTER (New setting - VMs can communicate):

Attached to: NAT Network

Name: Apple

Steps to change:

  • Click on the "Attached to:" dropdown
  • Select "NAT Network" from the list
  • A new field "Name:" will appear below
  • From the "Name:" dropdown, select "Apple" (the network we created)
  • Click OK to save
📸 Screenshot: Show the dropdown changed to "NAT Network" and Name set to "Apple"
6 Repeat for ALL Virtual Machines

You must do Step 4 and Step 5 for EVERY VM you have:

💡 Pro Tip: Write down the VM names and check them off as you complete each one. It's easy to forget one!

✅ Part 3: Testing the Network

Let's verify that your VMs can now communicate with each other!

7 Start Your Virtual Machines

Boot up your VMs:

  • Start Windows Server 2019
  • Start Ubuntu Linux
  • Wait for both to fully boot up
8 Find IP Addresses

On Windows Server:

  • Open Command Prompt
  • Type: ipconfig
  • Look for "IPv4 Address" - should be something like 10.10.10.X
  • Write it down! Example: 10.10.10.4

On Ubuntu Linux:

  • Open Terminal
  • Type: ip a or ifconfig
  • Look for "inet" address - should be something like 10.10.10.X
  • Write it down! Example: 10.10.10.5
📸 Screenshot: Show the IP addresses from both Windows and Linux
9 Test Communication with Ping

From Windows, ping Linux:

  • On Windows Command Prompt, type:
  • ping 10.10.10.5 (replace with your Linux IP)
  • You should see: "Reply from 10.10.10.5: bytes=32 time=1ms"

From Linux, ping Windows:

  • On Linux Terminal, type:
  • ping -c 4 10.10.10.4 (replace with your Windows IP)
  • You should see: "64 bytes from 10.10.10.4: icmp_seq=1 ttl=128 time=0.5 ms"
📸 Screenshot: Show successful ping replies from both directions
🎉 Success! If you see replies, congratulations! Your VMs can now communicate with each other!

🎨 Network Diagram

Here's what your network looks like now:

┌─────────────────────────────────────────────────┐ │ Internet / Your Host Computer │ └────────────────â”Ŧ────────────────────────────────┘ │ │ ┌────────â–ŧ─────────┐ │ NAT Network │ │ "Apple" │ │ 10.10.10.0/24 │ └────────â”Ŧ─────────┘ │ ┌──────────â”ŧ──────────┐ │ │ │ ┌─────â–ŧ─────┐ ┌─â–ŧ────────┐ ┌─â–ŧ──────┐ │ Windows │ │ Ubuntu │ │ ONOS │ │ Server │ │ Linux │ │ │ │10.10.10.4 │ │10.10.10.5│ │10.10.10.6│ └───────────┘ └──────────┘ └────────┘ ▲ ▲ ▲ │ │ │ └─────────────┴───────────┘ Can communicate!
â„šī¸ What This Means:
â€ĸ All VMs are on the same network (10.10.10.0/24)
â€ĸ They can ping each other
â€ĸ They can share files
â€ĸ They can run services that talk to each other
â€ĸ They can still access the internet through NAT

🔧 Troubleshooting

❌ Problem: VMs can't ping each other

Solutions to try:
❌ Problem: VMs have no internet access

Solutions to try:
❌ Problem: Can't find Network Manager

Alternative method:

🎓 Summary

What you accomplished:

💡 Next Steps:
Now that your VMs can communicate, you can:
← Back to Home