To minimize the risk of an attack through the management interface, ESXi includes a firewall between the management interface and the network.
To ensure the integrity of the host, only a small number of firewall ports are open by default. The vSphere Security documentation explains how to set up firewalls for your environment and which ports you might have to temporarily enable for certain traffic.
You manage firewalls by setting up firewall rulesets. vSphere Security documentation explains how to perform these tasks with the vSphere Web Client. You can also use esxcli network firewall to manage firewall rulesets and to retrieve information about them. Specify one of the options listed in Connection Options for vCLI Host Management Commands in place of <conn_options>.