ESXi includes a firewall that is enabled by default. During installation, the ESXi firewall is configured to block incoming and outgoing traffic, except traffic for services that are enabled in the host security profile.
As you open ports on the firewall, consider that unrestricted access to services running on an ESXi host may expose a host to outside attacks and unauthorized access. Reduce the risk by configuring the ESXi firewall to allow access only from authorized networks.
Manage ESXi Firewall Settings by Using the VMware Host Client
When you are logged in to an ESXi host with the VMware Host Client, you can configure incoming and outgoing firewall connections for a service or a management agent.
Procedure
Add Allowed IP Addresses for an ESXi Host by Using the VMware Host Client
By default, the firewall for each service allows access to all IP addresses. To restrict traffic, configure each service to allow traffic only from your management subnet. You can also deselect some services if your environment does not use them.