DNS resolution is not working on an ESXi host even though the DNS server configuration is correct.
The following symptoms are observed:
nslookup from the ESXi host returns: ;; connection timed out; no servers could be reached
or
Temporary failure in name resolution
esxcli network ip dns server list
cat /etc/hosts
VMware vSphere ESXi 8.x
The ESXi host firewall outbound rules for the DNS Client (dnsClient) ruleset are configured to allow connections only from specific IP addresses rather than allowing all outbound connections. This prevents the host from sending DNS queries to the configured DNS servers.
To verify this is the cause, run the following command from the ESXi shell:
esxcli network firewall ruleset allowedip list -r dnsClient
If the output shows Allowed IP Addresses with specific IPs listed instead of All, the firewall is blocking DNS traffic.
Modify the ESXi firewall to allow DNS client connections to any IP address using one of the following methods:
nslookup <hostname> from the ESXi shell.nslookup <hostname> from the ESXi shell. esxcli network firewall ruleset set -a true -r dnsClient
esxcli network firewall ruleset allowedip list -r dnsClient
The output should show Allowed IP Addresses: All.
nslookup <hostname>
If the error persists after following these steps, contact Broadcom Support for further assistance.
When opening a support request, provide the following information:
esxcli network firewall ruleset listesxcli network firewall ruleset allowedip list -r dnsClientesxcli network ip dns server list/etc/hosts