NAT
Network Address Translation (NAT) mode is the default networking mode used by VirtualBox.
Last updated
Network Address Translation (NAT) mode is the default networking mode used by VirtualBox.
Last updated
The following are the features of the NAT settings:
Allows connection to the host machine (NAT gateway IP address)
Does not allow connection to the guest machine from the host
Does not allow connections to the machines on the same LAN as the host machine
Allows internet access
Given the following configurations:
Guest machine in a "NAT" network setting(note: this is different from the "NAT network" network setting)
Host machine with 2 services running: 111/tcp
, 631/tcp
, IP: 10.0.2.2
— this is the NAT gateway IP for the guest machine
The following image below displays the output from an nmap
scan on the host machine (from the guest machine).
The image below displays the output from 3 commands:
TCP connection to the host machine at port 111 (with netcat)
TCP connection at port 631
TCP connection at port 632 — for control purposes
Notice that the response shows that ports 111 and 631 are open, while connection to port 632 is reufsed — port is closed.
We can see that the guest machine in a "NAT" network setting is able to communicate with the services on the host machine. For a more secure network setting, refer to the "NAT network" configuration.