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
.