Configuring ESXi firewall
To configure the firewall using the vSphere Web Client, follow the steps listed next:
Log in to the Web Client and select the vCenter icon.
Navigate to the list of hosts and select the desired host.
Under Manage, select Settings and go to Security Profile.
Configure firewall ports for both incoming and outgoing data for the host, by clicking on the Edit button.
Select the service you want to enable or disable and make desired changes.
Now we will see how to configure the firewall using the CLI commands using vCLI shell:
After logging on the CLI shell, first check the statistics of the firewall using the following command:
esxcli network firewall get
By default, the firewall should be enabled. However, to alter the state of firewall, following command is used:
esxcli network firewall set –enabled false esxcli network firewall set –enabled true
Once the firewall is enabled, use the following command to get the list of current firewall rules:
esxcli network firewall ruleset...