Wednesday, August 12, 2015

Setting up a DHCP server for your Virtual Lab in Virtual Box

This is an awesome trick to set up a DHCP server with the virtual lab that you have created for yourself.


Virtual Box Software (

Once you have installed the Virtual Box install the operating systems you like. For eg BT or Kali, Metasploitable, XP, Win7 etc.Now let us run into Configuring the Virtual Box Network.

Click on Network.

Adapter 1 should be set to NAT to ensure any kind of internet connectivity for updating of the tool etc.

Adapter 2 should be set to internal Network thereby providing it a name of nay choice. In this case we have named it as INTERNAL-NETWORK.

Please note that for all other VMs that you will be creating, you have to choose ADAPTER 1 and then internal network and name of each should be INTERNAL-NETWORK.

Configuring the DHCP in Virtual BOX:

For communicating on all the Virtual machine we will set up a DHCP server and help them communicate with each other. Follow the instructions for the same:

Open CMD prompt and change directory to installation directory. For me on my windows machine it is:

C:\Program Files\Oracle\VirtualBox>

Once navigated run:

VBoxManage dhcpserver add --netname INTERNAL-NETWORK --ip --netmask --lowerip --upperip –enable

This feature is very much available in the GUI as well.

I would suggest you to navigate to this utility called as VBOXMANAGE to explore its power.

Boot the BACKTRACK (or Kali whatever you have) Machine.
Check for the IP of Backtrack with the command ifconfig.

Check the DHCP interface by typing the command dhclient “intf” for the internal network interface.

Then boot the other machines and check for the IP addresses to cross confirm. Ping each of the machines from and to each other to ensure connectivity.

Happy Hunting:)

No comments:

Post a Comment