Skip to main content

Command Palette

Search for a command to run...

How to Set Up a Host-Only Internal Network in VMware Workstation

Updated
4 min readView as Markdown

In the previous articles, we installed Rocky Linux and Ubuntu Server as a VM in VMware Workstation Pro in Windows 11.

Now it's time to connect them properly, similar to how servers are connected in real production environment.

In this article, we will create a similar network architecture.

For now

  • All machines will be connected internally

  • They will be able to communicate with each other

  • They won't have internet access. Later in the series, we will introduce a dedicated router/firewall VM that will control outbound internet access when required.

Why Internal Network?

In a real production environment:

  • The application servers don't have direct internet access

  • Database servers are isolated

  • Internal communications are done via private IP addresses

  • Only bastion hosts have internet access

In VMware Workstation, this can be achieved using:

  • A host-only network, or

  • A custom VMNet configured as host-only

Creating Custom Virtual Network

Let's create our Custom Virtual Network

  1. Open the Start Menu, search for Virtual Network Editor, and open it

  2. Once opened, you will see two VMnets already present. If you recall, during VM creation, we selected NAT in the network setup step; we chose NAT. That NAT configuration is linked to the NAT adapter shown in this screen. You may notice that none of the settings are editable; click Change Settings button on the bottom right to enable modifications

  3. You may also see VMnet0 of type Bridged. We are not concerned with this as of now. Click Add Network...

  4. Proceed with the default options and click OK

  5. A new VMnet will be created with the following default configurations

    • NAME: VMnet2

    • Type: Host-only

    • Subnet Address: 192.168.x.x

  6. Select the newly created VMnet2, and modify the following:

    • Subnet IP: 172.29.10.0

    • Subnet mask: 255.255.255.0 Optionally, click Rename Network... and set name to devops, this will be useful later

    Ensure the following options are selected

    • Host-only

    • Connect a host virtual adapter to this network

    • Use local DHCP service to distribute IP address to VMs

  7. Next, modify the default NAT adapter:

    • Select the adapter with the type NAT (typically VMnet8)

    • Set the Subnet IP to 172.18.18.0 Ensure the NAT option remains selected; otherwise, the internet connectivity will break.

  8. Once configured, click⁣ Apply and then OK

Why I Chose Those IP Ranges

Even in a home lab, proper IP planning prevents future conflicts and builds production-ready habits.

For this lab I chose:

  • 172.29.10.0/24 for Internal Network - devops (VMnet2)

  • 172.18.18.0/24 for Default NAT Network - VMnet8

Most enterprise networks commonly use 10.0.0.0/8 or subnets of 172.16.0.0/16, while home routers typically operate within 192.168.0.0/16. Choosing these ranges would increase the risk of conflicts when connected to the office networks via VPN or within the corporate environments.

I also avoided the 172.17.0.0/16 range because Docker uses it for its default bridge network (docker0). If we install Docker inside any of these VMs in the future, overlapping of subnets might introduce routing problems.

By selecting less commonly used private IP ranges, we are reducing the likelihood of future conflicts.

Configuring New Network Adapter in Our VMs

Now, let's configure our VMs to use this network adapter instead of the default NAT adapter.

  1. Power off the VM (if it's running).

  2. Navigate to VM > Settings or press Ctrl + D

  3. Select Network Adapter, Choose Custom, and select devops (Host-only) from the dropdown. Click OK

  4. Do the same for both the VMs we have created until now and start both the VMs.

Verifying New Network Configuration and Connectivity

  1. Log in to each VM and note their IPs. You should now see that the IPs are now in range 172.29.10.x/24.

    For example:

    • Ubuntu: 172.29.10.130

    • Rocky: 172.29.10.129

  2. Try pining www.google.com from either VM, - it will fail. However,

    • The VMs should be able to ping each other

    • The host machine should be able to ping both VMs

What's Next??

In the next article I will show you how to configure a static IP address in both Ubuntu and Rocky Linux.

Series Roadmap

  1. Download VMware Workstation Pro ✅

  2. Installation Guide ✅

  3. Creating Your First VM (Ubuntu Server 22.04)

  4. Installing Rocky Linux on VMware

  5. Setting up Internal Networks ✅

  6. Configuring Static IP on Ubuntu and Rocky

  7. Building a Gateway VM for Multi-VM Lab Architecture

  8. Multi-VM DevOps Lab Architecture