[pve-devel] [PATCH 2/2] bridge rules : -j ACCEPT for physical interfaces

Alexandre Derumier aderumier at odiso.com
Tue Feb 25 13:47:52 CET 2014


We need to accept traffic at the end of bridge rules for outgoing packets from tap->ethX,
as we don't do ACCEPT in tap-out rules.

IN=vmbr0 OUT=vmbr0 PHYSIN=tap110i0 PHYSOUT=eth0

-A PVEFW-FORWARD -o vmbr0 -m physdev --physdev-is-bridged -j vmbr0-FW
-A PVEFW-FORWARD -i vmbr0 -m physdev --physdev-is-bridged -j vmbr0-FW

	-A vmbr0-FW -m physdev --physdev-is-in --physdev-is-bridged -j vmbr0-OUT
	-A vmbr0-FW -m physdev --physdev-is-out --physdev-is-bridged -j vmbr0-IN
	-A vmbr0-FW -j ACCEPT

-A PVEFW-FORWARD -o vmbr0 -j DROP
-A PVEFW-FORWARD -i vmbr0 -j DROP

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Firewall.pm |    1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/Firewall.pm b/PVE/Firewall.pm
index ea24cfb..343f60c 100644
--- a/PVE/Firewall.pm
+++ b/PVE/Firewall.pm
@@ -653,6 +653,7 @@ sub generate_bridge_chains {
     if (!ruleset_chain_exist($ruleset, "$bridge-IN")) {
 	ruleset_create_chain($ruleset, "$bridge-IN");
 	ruleset_addrule($ruleset, "$bridge-FW", "-m physdev --physdev-is-bridged --physdev-is-out -j $bridge-IN");
+	ruleset_addrule($ruleset, "$bridge-FW", "-j ACCEPT");
     }
 }
 
-- 
1.7.10.4




More information about the pve-devel mailing list