6.5.1

Table Of Contents
n
If the nfsClient rule set is enabled, the state of the rule set and the allowed IP address policy are
not changed. The IP address of the NFS server is added to the allowed list of outgoing IP addresses.
Note If you manually enable the nfsClient rule set or manually set the Allow All IP Addresses policy,
either before or after you add an NFS v3 datastore to the system, your settings are overridden when the
last NFS v3 datastore is unmounted. The nfsClient rule set is disabled when all NFS v3 datastores are
unmounted.
When you remove or unmount an NFS v3 datastore, ESXi performs one of the following actions.
n
If none of the remaining NFS v3 datastores are mounted from the server of the datastore being
unmounted, ESXi removes the server's IP address from the list of outgoing IP addresses.
n
If no mounted NFS v3 datastores remain after the unmount operation, ESXi disables the nfsClient
firewall rule set.
NFS v4.1 Firewall Behavior
When you mount the first NFS v4.1 datastore, ESXi enables the nfs41client rule set and sets its
allowedAll flag to TRUE. This action opens port 2049 for all IP addresses. Unmounting an NFS v4.1
datastore does not affect the firewall state. That is, the first NFS v4.1 mount opens port 2049 and that port
remains enabled unless you close it explicitly.
ESXi ESXCLI Firewall Commands
If your environment includes multiple ESXi hosts, automating firewall configuration by using ESXCLI
commands or the vSphere Web Services SDK is recommended.
Firewall Command Reference
You can use the ESXi Shell or vSphere CLI commands to configure ESXi at the command line to
automate firewall configuration. See Getting Started with vSphere Command-Line Interfaces for an
introduction, and vSphere Command-Line Interface Concepts and Examples for examples of using
ESXCLI to manipulate firewalls and firewall rules.
Table 37. Firewall Commands
Command Description
esxcli network firewall get
Return the enabled or disabled status of the firewall and lists
default actions.
esxcli network firewall set --default-action
Set to true to set the default action to pass. Set to false to set
the default action to drop.
esxcli network firewall set --enabled
Enable or disable the ESXi firewall.
esxcli network firewall load
Load the firewall module and rule set configuration files.
esxcli network firewall refresh
Refresh the firewall configuration by reading the rule set files if
the firewall module is loaded.
esxcli network firewall unload
Destroy filters and unload the firewall module.
esxcli network firewall ruleset list
List rule sets information.
vSphere Security
VMware, Inc. 75