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 –

This script also requires powershell-yaml module –

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



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 *