esxi_firewall

ESXi firewall rules via SOAP/pyVmomi.

saltext.vcf.clients.esxi_firewall.enabled(opts, profile=None)[source]

Return the host’s global firewall enabled state (bool).

saltext.vcf.clients.esxi_firewall.set_global_enabled(opts, value, profile=None)[source]

Enable or disable the host firewall globally.

Wraps HostFirewallSystem.UpdateDefaultPolicy. When value=False, both incomingBlocked and outgoingBlocked flip to False, allowing all traffic regardless of ruleset state. This is the ESXi-equivalent of esxcli network firewall set --enabled=false.

saltext.vcf.clients.esxi_firewall.set_allowed_ips(opts, rule, allowed_ips, all_ip=False, profile=None)[source]

Replace the allowed-IP list for rule.

allowed_ips is a list of strings (CIDR or single addresses). all_ip True opens the rule to all sources.