6.0.3

Table Of Contents
n
If no mounted NFS v3 datastores remain after the unmount operation, ESXi disables the nfsClient
rewall rule set.
NFS v4.1 Firewall Behavior
When you mount the rst NFS v4.1 datastore, ESXi enables the nfs41client rule set and sets its allowedAll
ag to TRUE. This action opens port 2049 for all IP addresses. Unmounting an NFS v4.1 datastore does not
aect the rewall state. That is, the rst 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 rewall conguration by using ESXCLI
commands or the vSphere Web Services SDK is recommended.
You can use the ESXi Shell or vSphere CLI commands to congure ESXi at the command line to automate
rewall conguration. See Geing Started with vSphere Command-Line Interfaces for an introduction, and
vSphere Command-Line Interface Concepts and Examples for examples of using ESXCLI to manipulate rewalls
and rewall rules.
Table 57. Firewall Commands
Command Description
esxcli network firewall get
Return the enabled or disabled status of the rewall and
lists default actions.
esxcli network firewall set --default-action
Set to true to set the default action to pass, set to fals to set
the default action to drop.
esxcli network firewall set --enabled
Enable or disable the ESXi rewall.
esxcli network firewall load
Load the rewall module and rule set conguration les.
esxcli network firewall refresh
Refresh the rewall conguration by reading the rule set
les if the rewall module is loaded.
esxcli network firewall unload
Destroy lters and unload the rewall module.
esxcli network firewall ruleset list
List rule sets information.
esxcli network firewall ruleset set --allowed-
all
Set to true to allow all access to all IPs, set to false to use a
list of allowed IP addresses.
esxcli network firewall ruleset set --enabled
--ruleset-id=<string>
Set enabled to true or false to enable or disable the
specied ruleset.
esxcli network firewall ruleset allowedip list
List the allowed IP addresses of the specied rule set.
esxcli network firewall ruleset allowedip add
Allow access to the rule set from the specied IP address or
range of IP addresses.
esxcli network firewall ruleset allowedip
remove
Remove access to the rule set from the specied IP address
or range of IP addresses.
esxcli network firewall ruleset rule list
List the rules of each ruleset in the rewall.
Customizing ESXi Services from the Security Profile
An ESXi host includes several services that are running by default. Other services, for example SSH, are
included in the host's security prole. You can enable and disable those services as needed if company
policy allows it.
“Use the vSphere Web Client to Enable Access to the ESXi Shell,” on page 202 is an example of how to
enable a service.
N Enabling services aects the security of your host. Do not enable a service unless strictly necessary.
vSphere Security
178 VMware, Inc.