Saturday, March 2, 2024

Configuring NAT on VMware workstation

WMware workstation gives you several good features when it comes to configuring your network. One of these features is to have NAT working between your host network and the guest network. This will be needed if your vmware guest network is on a subnet. However be aware if you do not configure the virtual network adapters properly, you might end up messing your host machines internet. A quick solution if this happens is to click restore defaults on the VMware Virtual Network Editor or uninstall VMware and reinstall it.

For a VMware NAT setup, when first installing the guest machine or creating the VM you need to select NAT as the network adapter option. If it is a server you should select NAT:Used to share hosts IP address. After creating the VM you need to configure NAT using the VMware Virtual Network Editor. You should be able to find the Virtual Network Editor by going to Edit in VMware and then selecting Virtual Network Editor. This will show all the VMware virtual networks. If you look at Network adapters in your host machine you should be able to see some of these virtual networks as well as your wireless and wired network adapters.  

Click on Change Settings to enable the admin function. Then select the virtual network adapter used for NAT this will say NAT as the Type. Do not make any changes to other network adapters.
 
---------Click on the images to get a clear picture.

With the options that I have selected here and with the box checked  Connet a host virtual adapter to this network I can run a separate network that shares the host machine ip using NAT. And VMnet8 virtual network is a subnet of 192.168.0.0/24 network. Which is the host network. Click on NAT Settings button. Provide the NAT configurations.
 

Note the Gateway IP specified here. This is your default gateway for the vmnet8 network. It's as if vmnet8 is your router and the default gateway of this router is the Gateway ip specified here. In terms of the IPV6 prefix you can specify an appropriate prefix for your network. However keep this box ticked only if you have properly configured your network with IPV6 settings, otherwise keep the box unchecked. I don’t want to go into detail about IPV6 option. For DNS settings, provide the DNS settings of your ISP or a public DNS address. 

After configuring NAT on our virtual network vmnet8, we can use this virtual network as a intranet. For workstations on this intranet select Custom: Specific virtual network and the virtual network with NAT configured.

No comments: