VMware Workstation

 View Only

 Workstation 17.5.2 - Linux Host NAT DNS Does not resolve Guest

GoDanno's profile image
GoDanno posted May 31, 2024 05:27 AM

From a Linux host, I'm unable to connect to guest VM's with NAT networks in Workstation 17.5.2.
Is there anything I can to do resolve this issue or is it a bug?

Virtual DHCP is properly assigning IP addresses to guest VM's. But virtual DNS does not appear to be resolving guests. Ping and SSH result in errors like the following, respectively:

ping: user@foobar-machine: Name or service not known
ssh: Could not resolve hostname foobar-machine: Name or service not known

The following connections work as expected:

  • Linux host to Linux guest with Bridged connection
  • Linux host to Linux guest with NAT after adding guests to the /etc/hosts file of the host. Both Ping and SSH succeed.
  • Windows 11 host to Linux guest with NAT connection

Environment details:

Host: Debian 12.5 (bookworm)

Guests:

  • Debian 12.5 (bookworm) - ping host succeeds
  • Photon OS 5.0 - ping host results in Temporary failure in name resolution error (this may be as designed due to default config of Photon OS)

/etc/NetworkManager/NetworkManager.conf:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

/etc/resolv.conf:

# Generated by NetworkManager
nameserver 192.168.0.1
nameserver fe80::1411:32ff:fefb:3d0a%wlp0s20f3

networkctl status outputs the following virtual addresses:

172.16.33.1 on vmnet1
192.168.46.1 on vmnet8

Any help is appreciated.

Thanks

Technogeezer's profile image
Technogeezer

Instead of trying to use "ping" can you post the results of "dig" or "nslookup" of the hostnames you're interested in on each host so that we can see what the resolver is actually telling you?

A reminder that the NAT networking serves as a firewall, and any multicast DNS won't propagate through the NAT firewall. 

What host or guest  is giving you the "name or service not known" errors? 

Dhairya Tomar's profile image
Broadcom Employee Dhairya Tomar

@GoDannoIf you have the IP of foobar-machine, can they try pinging directly to the IP instead of host name

GoDanno's profile image
GoDanno

@Dhairya Tomar Yes, ping IP address succeeds. I prefer to access by name. As a workaround, I added the mappings to /etc/hosts on the Debian host.