Dealing with hosts FW the smart way

Taledo

Active Member
Nov 20, 2020
94
13
48
55
Hey all,

We've got a few PVEs on a few clusters (give or take, 12 hosts). They're on a separated, dedicated network, but we'd like to add another layer on the hosts, just in case.
Issue is, manually managing all of this isn't a solution in the long run.
How do you guys manage, update and monitor your firewalls on the PVEs? Ansible? Terraform? Something else?

Best Regards,

Taledo
 
Hello,

Making changes to the clusters firewall is probably best done via the web UI or API.
You can make changes to any node from a single node via web UI or API.
So no real need for ansible like solutions.
I wouldn't hand roll a solution.

For monitoring, when the firewall logs are enabled, they are outputted to:
/var/log/pve-firewall.log
Anything that can parse that should work.
rsyslog, Nagios, Loki, Zabbix etc etc

Logs can also be retrieved via API:
api2/json/nodes/<node-id>/firewall/log
 
Last edited:
So no real need for ansible like solutions.
I wouldn't hand roll a solution.
This sounds like "do nothing" to me, I would use either one of those solution.

Let's check if we both grasp what OP wants: As far as I understand it, it boils down to synchronizing firewall rules across cluster, which AFAIK has no solution yet. It's not about the VM itself, just the datacenter level stuff.

We tried to build general rules via hosts (local), host sets (local) and security groups (global), where the host sets have general names likes dns-server, package-mirror, dhcp-server, etc. and locally their own hosts. The security groups just use the host sets so that the rules can be the same on all clusters and synchronized by some automation tool (or just git), but the other configuration stays local. This assumes disjoint networks. With the same network, you can also copy the hosts and host sets.
 
  • Like
Reactions: Johannes S