Using NAT in VMWare to host web server or Bridged network

Posted under » Linux » Apache on 20 January 2023

Sometimes I connect a server that is in VMware form in a windows PC that is powerful. I used to prefer using a bridged network but lately, I find it more secure using NAT.

You need to open vmware and also the windows firewall if need to connect from outside

To open VMware (I am using VMware 16), you will need to go to Edit > Virtual Network Editor
You will need to be admin of the PC to 'change settings'.

For my router, my PC IP looks like 192.168.1.7. The internal NAT IP may look like 192.168.78.129.

To connect via SSH, you will need to connect to the internal IP. If from the machine itself, you can connect directly.

However, if from outside PC, then first you must map incoming port.

I am interested in port 22 and 80 only.

The next step is to open the port in Windows Defender Firewall.

I think this is very secure because not only does we need to open the Windows Firewall, we also need to map or open the port in VMWare.

If you have a Wifi and ethernet network on the same server or PC, using a bridged network can make sense. Although it can be buggy. If somehow it cannot detect your wifi connection, perhaps after a windows update, you may need to to a cold reboot. My theory is that the wifi gets too hot... maybe : )

web security linux ubuntu Raspberry   git   javascript python django Laravel drupal php apache mysql  MongoDB AWS data  AL2023