IPv4 Firewall not working - what am I missing?

jernej-isl

New Member
Oct 21, 2024
5
1
3
Hello all!
I am using Proxmox since v3 but have not used its Firewall yet. For now I just want to restrict access to my Proxmox node not my VMs. I have enabled firewall in datacenter (with ACCEPT for input and output policy) and on the node itself. Then I have put in a simple rule to drop icmp packets. However when I ping the host I still get response. What am I missing here?

Code:
root@sproxmox:/etc/pve/firewall# cat cluster.fw
[OPTIONS]

enable: 1
policy_in: ACCEPT


root@proxmox:/etc/pve/nodes/proxmox# cat host.fw
[OPTIONS]

enable: 1

[RULES]

IN DROP -p icmp -log nolog
 
I think I found the reason. When I checked the status with systemctl status pve-firewall.service I found some error lines like:

Code:
Oct 22 08:54:23 proxmox pve-firewall[2360518]: status update error: iptables_restore_cmdlist: Try `iptables-res
 
Can you then post the whole output of the journal?

Code:
journalctl -b -u pve-firewall > pve-firewall.txt
 
Can you post the output of:

Code:
pve-firewall compile
iptables-save
 
Hello Stefan. Output is in the attached files. I think the main problem was a typo in host.fw (I tried to prepare and deploy file to server with ansible). That typo consequently caused configuration error and firewall didn't start..... so no wonder my testing didn't work as expected :)
Thank you for your help!
 

Attachments

  • Like
Reactions: shanreich