How to Set Up a Host-Only Internal Network in VMware Workstation
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
Open the Start Menu, search for
Virtual Network Editor, and open it
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; clickChange Settingsbutton on the bottom right to enable modifications
You may also see
VMnet0of typeBridged. We are not concerned with this as of now. ClickAdd Network...
Proceed with the default options and click OK
A new VMnet will be created with the following default configurations
NAME: VMnet2
Type: Host-only
Subnet Address: 192.168.x.x
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
Next, modify the default NAT adapter:
Select the adapter with the type NAT (typically
VMnet8)Set the Subnet IP to
172.18.18.0Ensure theNAToption remains selected; otherwise, the internet connectivity will break.
Once configured, click
Applyand thenOK
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/24for Internal Network - devops (VMnet2)172.18.18.0/24for 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.
Power off the VM (if it's running).
Navigate to
VM > Settingsor press Ctrl + D
Select
Network Adapter, ChooseCustom, and selectdevops (Host-only)from the dropdown. Click OK
Do the same for both the VMs we have created until now and start both the VMs.
Verifying New Network Configuration and Connectivity
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
Try pining
www.google.comfrom 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
Setting up Internal Networks ✅
Configuring Static IP on Ubuntu and Rocky
Building a Gateway VM for Multi-VM Lab Architecture
Multi-VM DevOps Lab Architecture

