Use NAT Network In VirtualBox

Create a NAT Network using VirtualBox GUI

Open VirtualBox Preferences (File -> Preferences) and go to Network Tab.


Click on the icon on right side (Adds new NAT network). It will create a new NAT Network without asking any questions.


ou can modify the Network Name, Network CIDR etc by clicking modify button (or double click the NAT Network)


You can also add Port Forwarding for accessing VM (over ssh or http kind of protocols). In below example, we have added a Port Forwarding rule so that the VM IP 192.168.0.5:22 can be accessed via localhost:1022.


Use NAT Network for Virtual Machines

Once you have created NAT Network, assign the same for the VM Network.