Virtualbox: How to setup NAT with DHCP

Hi folks, in this article I will demonstrate how easy it is to setup a NAT (Network Address Translation) on virtualbox. I use this very often to isolate resources from my virtual servers and my physical network while still having access to the internet from my virtual servers. Another great thing about this setup on virtualbox is the possibility to have native DHCP for your NAT configuration, allowing you to perform a broader range of tests.

Let’s get it started! Open up your virtualbox and go to File -> Preferences and on the newly opened window, select Network and click on the add icon as illustrated in the image below:


The new network will be added to the list, double click on it and edit the network name, IP range, mask and enable the DHCP. Here is an example of how to setup a NAT that will work with IPs ranging from to, where will be its default gateway:


Now you can go to any of your VMs and change their NIC to NAT and select the entry nat_net1.


That’s it, simple and easy. Hope this helps.


About Bruno Carvalho

Coffee addicted tech guy.
This entry was posted in Virtualization and tagged , , , , , , , , , . Bookmark the permalink.

One Response to Virtualbox: How to setup NAT with DHCP

  1. Pingback: Port forward to NAT networks from different hosts on Virtualbox | SAP, Databases and other IT stuff

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s