To manage firewall rules on ESXi hosts I wrote a PowerShell script that uses a YAML input file and sets allowed IPs on described services. Before adding IPs from the config file all old IPs are removed.

The script is available on GitHub – https://github.com/kallepihelgas/vmware-scripts/tree/main/esxi_firewall_rules.

This script also requires powershell-yaml module – https://www.powershellgallery.com/packages/powershell-yaml/0.4.2.

I’m periodically running this from a script server to enforce firewall rules.

Older post from “Securing ESXi” series
Securing ESXi part 1 – User password policies
Securing ESXi part 2 – SSH and ESXi shell
Securing ESXi part 3 – Intel CPU vulnerabilities
Securing ESXi part 4 – Log levels and syslog

Share:

administrator

ahmedaljanahy Creative Designer @al.janahy Founder of @inkhost I hope to stay passionate in what I doing

Leave a Reply

Your email address will not be published. Required fields are marked *