Testing TCP/UDP port connectivity in VMware ESXi 5.x Host

There may be times when you need to test TCP/UDP port connectivity from an ESXi host, here are some useful netcat commands. If you see no output from these commands it means the connection failed.

Test TCP Port 902:
~ # nc -z 192.168.11.5 902
Connection to 192.168.11.5 902 port [tcp/authd] succeeded!

Test UDP Port 668:
~ # nc -vnzu 192.168.11.4 668
Connection to 192.168.11.4 668 port [udp/*] succeeded!

Additional Options:
TCP:
192.168.11.8 is my vmk0 vmkernel IP (esxcfg-vmknic -l)
~ # nc -z -w 1 -s 192.168.11.8 -t 192.168.11.5 902
Connection to 192.168.11.5 902 port [tcp/authd] succeeded!
UDP:
192.168.11.8 is my vmk0 vmkernel IP (esxcfg-vmknic -l)
~ # nc -z -w 1 -s 192.168.11.8 -u 192.168.11.4 668
Connection to 192.168.11.4 668 port [udp/*] succeeded!

If you are suspecting that an ESXi firewall is blocking some connections, disable it temporarily.
esxcli network firewall unload
Turn it back on:
esxcli network firewall load

This entry was posted in Linux, VMware and tagged , , . Bookmark the permalink.

Comments are closed.