VMware Communities
virtual031
Contributor
Contributor

How to reach VM with NAT networking

If my host is at IP 192.168.0.100, and my VM is running with Shared (NAT) networking with IP 192.168.102.129

How can I reach my VM from my host? I Can't change the Share (NAT) networking to Bridged mode.

Tags (2)
Reply
0 Kudos
6 Replies
RDPetruska
Leadership
Leadership

Your host knows about the virtual NAT adapter, so you should be able to ping, connect, etc. with no issues at all.  If you want to reach the VM from another computer on the network, however, you need to add some port forwarding rules using the Virtual Network Editor.

Reply
0 Kudos
virtual031
Contributor
Contributor

But I can't though. If I ping 192.168.102.129, it all times out

Reply
0 Kudos
amohammadimir
Hot Shot
Hot Shot

You need to use port forwarding, with port forwarding, incoming TCP or UDP requests are sent to a specific virtual machine on the virtual network that is served by the NAT device.

By pinging the virtual machine you are using ICMP which is another protocol rather than TCP/UDP. That's why your ping doesn't work.

Please remember to mark the replies as answers if they helped.
Reply
0 Kudos
RDPetruska
Leadership
Leadership

Does your host or your guest have a firewall enabled?  Generally, ping is blocked/dropped by many firewalls nowadays.

Reply
0 Kudos
virtual031
Contributor
Contributor

It does have firewall, but ping and simple web server / file sharing should already be configured to work.

For example, if I change the VM to bridged mode, and access it as part of my "normal" network, then everything works.

If I switch it to NAT networking mode, then my host can't access the VM anymore

Reply
0 Kudos
virtual031
Contributor
Contributor

Sorry, I'm a novice. Could you explain that further? What steps should I take to make it work correctly?

Reply
0 Kudos