0

I am setting up several Linux virtual machines in VirtualBox to practice for the RHCSA exam. I want them to communicate with each other for testing networking commands such as ping, ssh, and file transfers.

Right now, I am not sure which VirtualBox network mode allows full connectivity between VMs without exposing them to my home network.

My goals are:

Each VM can reach the others (for example, by IP address).

I can keep the setup local and isolated for security.

I can still connect from my host machine if needed.

Which VirtualBox network configuration (NAT, host-only, internal, or bridged) would best meet these requirements, and how can I verify that the network is working correctly once configured?

1
  • It's unclear whether the VMs need access to the public Internet (or to your LAN) and whether "I can still connect from my host machine if needed" means connecting to the VM via SSH from your host machine, or if it means opening a console on the VM in VirtualBox (no networking). Commented Oct 31 at 7:01

1 Answer 1

1

Per introduction to network modes:

Host-only networking. This can be used to create a network containing the host and a set of virtual machines, without the need for the host's physical network interface. Instead, a virtual network interface, similar to a loopback interface, is created on the host, providing connectivity among virtual machines and the host.

This allows VMs to communicate with each other. As the host will have an IP address assigned to its "Host-Only Ethernet Adapter", it will also be able to connect to VMs on the virtual network. There will be a DHCP server running by default; you can disable this if you want one of your VMs to be the DHCP server instead.

Diagram of a host-only adapter connected to three other VMs

As for verifying whether the network is working: try using ping to verify that machines & host can reach each other via their IP addresses.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.