Setting up firewall programatically

Lucian

Well-Known Member
Nov 7, 2017
35
1
48
42
Hello,

Is there anyway to interact with the PVE firewall, something like the "qm" utility perhaps?
I need to be able to script setting it up, but it can't be a manual procedure.
 
Hi,
maybe have a look at `man pve-firewall`. The firewall configurations are located under /etc/pve/firewall/cluster.fw for the cluster wide config, /etc/pve/nodes/<nodename>/host.fw for the host config and /etc/pve/firewall/<vmid>.fw for VMs and CTs. Also you can perform direct API calls with `pvesh`.

Hope this helps!