At this point in the course, some of you might be asking yourselves the following questions:
What is the difference between configuring the network adapter of our virtual machines in Host-Only, NAT, or Bridge mode?
Are we safe configuring our vulnerable Metasploitable3 machines with a NAT adapter?
I’d like to share with you a brief summary I’ve created about the differences between these three mechanisms used to configure a virtual machine’s network interface.
Bridge Mode Connection
With the network adapter set to bridge mode, the virtual machine has direct access to the external Ethernet network and receives its own IP address within this network (as if it were another device connected to the network).
This means that if we configure the network interface of our virtual machine in bridge mode, the virtual machine will receive its own IP address within the same network as the host machine, which will have a different IP address.
This type of configuration allows other devices on the network to communicate directly with the virtual machine using its IP address. Therefore, if our virtual machine is vulnerable, it could potentially be exploited by someone else on the network.
Network Address Translation (NAT)
Using NAT means that the virtual machine and the host system share a single "identity" (IP address) within the network they are in. The NAT option should be selected if you do not want the virtual machine to have a separate IP address but still want internet connectivity.
This configuration does not allow other devices on the network to communicate directly with the virtual machine. As a result, it cannot be exploited by someone else on the network. However, the virtual machine can initiate connections to external networks such as the internet.
Host-Only Mode
Using the Host-Only configuration establishes a network connection between the virtual machine and the host system via a virtual network adapter that is only visible to the host operating system.
With the network adapter set to Host-Only, the virtual machine can only communicate with the host system and other virtual machines in the Host-Only network. The virtual machine will not have internet connectivity or access to other devices on the same network as the host machine.
This option is selected to create an isolated virtual network, which is particularly useful for security testing. Even if the virtual machine is infected, the infection cannot spread to any other device on the network.
I hope this explanation about the types of virtual machine network adapter connections is helpful and enables you to make better decisions regarding their configuration.
Thank you all very much, and see you in the next section!
Santiago.