PVE4 - VM Firewalls not working

nedry

New Member
Apr 20, 2014
4
0
1
I've got a clean install of Proxmox 4 with a newly created lxc container. I enabled the firewall for the datacenter and the node. I see the the expected rules when I run iptables-save.

Next, as a test, I enabled the container's firewall and added two rules, one to DROP POP3 and the other to REJECT IMAP. When I view the rules using iptables-save, no rules have been added for POP3 or IMAP. Also, pve-firewall simulate shows that the rules are not working.

What am I missing?

# cat 100.fw:
Code:
[OPTIONS]
enable: 1
[RULES]
IN POP3(DROP) -i net0
IN IMAP(REJECT) -i net0

# cat cluster.fw:
Code:
[OPTIONS]
enable: 1

# pve-firewall simulate -to ct100 -dport 143
Code:
Test packet:
  from    : outside
  to      : ct100
  proto   : tcp
  dport   : 143
ACTION: ACCEPT

# pve-firewall simulate -to ct100 -dport 110
Code:
Test packet:
  from    : outside
  to      : ct100
  proto   : tcp
  dport   : 110
ACTION: ACCEPT
 
Thank you for that information, Dietmar. That worked. FWIW, I could only enable the firewall flag on the network interface while the VM was shutdown.

I can see that the firewall configurations for the DC and VM are stored in cluster.fw and 100.fw, respectively. Where is the configuration for the host and network interface stored?
 

I can see that the firewall configurations for the DC and VM are stored in cluster.fw and 100.fw, respectively. Where is the configuration for the host and network interface stored?

host firewall is stored at:

/etc/pve/nodes/<nodename>/host.fw

network interface firewall flag is inside VM config.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!