Building an Internal Network in VirtualBox

Kapil Verma
2 min readJun 1, 2019


How to connect virtual box VM using the internal network?

Sometimes we need VMs to be internally connected to each other and completely isolated from the outside/external network.
For that we need to create a internal network on virtual box and then connect the VMs on it.

We will have to create a DHCP server using the below command.

vboxmanage dhcpserver add — netname testlab — ip — netmask — lowerip — upperip — enable

Run the above command in your host OS terminal.
•netname testlab: The internal network will be named intnet. This is the name you should then put inside your VM’s Network > Adapter > (Internal network) > Name field.
•ip The IP address of your DHCP server inside the internal network.
•netmask The subnet mask.
•lowerip The lower bound of the IP addresses that can be assigned to network members.
•upper The upper bound of the same thing.
•enable: Enable the DHCP server.

After that select the internal network from the VM’s setting and choose the network name as testlab. if there’s no testlab just manually type testlab.

See from the above screen shot

My Bad Blue’s IP is
and windows 7 IP is

Let’s check if we can ping each other.

Cool we are able to ping each other.

Let’s check if we can access internet on the machines or not.

See, We can’t ping

That means the machines are connected to the internal network testlab but can’t access the internet means they are not accessible from the internet either.

Now just add another bridged network on the second network adapter and you are ready to go.



Kapil Verma

Security researcher, Blogger, Bug Bounty hunter