Hi
I'm trying to block some simple outbound traffic from a specific VM.
Firewall is enable on the datacenter lever, on the node level and on the VM level (name "hub", ip "10.1.0.112").
I'm trying to block icmp to 1.1.1.1.
But nothing appears on the iptables chain "PVEFW-HOST-OUT".
I have only the "DROP line" if I add the rule on the node level :
With and without the rule in the node level, I can still ping 1.1.1.1 ...
What am I missing ?
I'm trying to block some simple outbound traffic from a specific VM.
Firewall is enable on the datacenter lever, on the node level and on the VM level (name "hub", ip "10.1.0.112").
I'm trying to block icmp to 1.1.1.1.
Code:
root@marvin:/etc/pve/firewall# cat 112.fw
[OPTIONS]
ipfilter: 1
enable: 1
policy_out: ACCEPT
log_level_out: debug
policy_in: ACCEPT
log_level_in: debug
[ALIASES]
cloudflaredns 1.1.1.1
[RULES]
OUT DROP -source dc/hub -dest guest/cloudflaredns -p icmp -log debug -icmp-type any
root@marvin:/etc/pve/firewall# cat cluster.fw
[OPTIONS]
policy_in: ACCEPT
enable: 1
log_ratelimit: burst=5,enable=1,rate=1/second
[ALIASES]
hub 10.1.0.112
cloudflareDNS 1.1.1.1
[IPSET all_vm_except_fw] # All VM ip except FW
10.0.0.0/16 # Internal LAN
!10.0.0.254 # FW ip
10.1.0.2 # Marvin
10.1.0.253
10.7.0.0/24 # vpn client subnet
[group isolated_vm] # VM isolé (block vmbr1 except FW)
OUT DROP -dest +all_vm_except_fw -p icmp -log alert
OUT DROP -dest +all_vm_except_fw -p udp -log alert
OUT DROP -dest +all_vm_except_fw -p tcp -log alert
But nothing appears on the iptables chain "PVEFW-HOST-OUT".
I have only the "DROP line" if I add the rule on the node level :
Code:
Chain PVEFW-HOST-OUT (1 references)
target prot opt source destination
ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0
DROP 0 -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
RETURN 2 -- 0.0.0.0/0 0.0.0.0/0
DROP 1 -- 10.1.0.112 1.1.1.1 icmptype 255
RETURN 6 -- 0.0.0.0/0 10.210.0.0/24 tcp dpt:8006
RETURN 6 -- 0.0.0.0/0 10.210.0.0/24 tcp dpt:22
RETURN 6 -- 0.0.0.0/0 10.210.0.0/24 tcp dpts:5900:5999
RETURN 6 -- 0.0.0.0/0 10.210.0.0/24 tcp dpt:3128
RETURN 17 -- 10.210.0.2 10.210.0.1 udp dpts:5404:5405
RETURN 0 -- 0.0.0.0/0 0.0.0.0/0
0 -- 0.0.0.0/0 0.0.0.0/0 /* PVESIG:NmZbdGkH+OVDfAA839uPiAAtSQI */
With and without the rule in the node level, I can still ping 1.1.1.1 ...
What am I missing ?