diff --git a/gestion/gen_confs/firewall_komaz.py b/gestion/gen_confs/firewall_komaz.py index 69440e77..8b3d0988 100755 --- a/gestion/gen_confs/firewall_komaz.py +++ b/gestion/gen_confs/firewall_komaz.py @@ -84,6 +84,7 @@ class firewall_komaz : """ zone_serveur="138.231.136.0/28" eth_ext = "eth2" + eth_int = "eth0" # Ports ouverts ports_default = { 'tcp_EXT_VERS_CRANS' : [ '22' ], 'tcp_CRANS_VERS_EXT': [ ':79', '81:134', '136', '140:444', '446:'], @@ -455,6 +456,9 @@ class firewall_komaz : """ Construit la chaines de filtrage du p2p (FILTRE_P2P) """ self.anim = anim(" Filtrage p2p") iptables('-F FILTRE_P2P') + + # On ne filtre que ce qui passe sur l'interface externe + iptables('-A FILTRE_P2P -i %s -o %s -j RETURN' % self.eth_int) for port in self.ports_p2p : iptables('-A FILTRE_P2P -p tcp --dport %s -j REJECT --reject-with icmp-admin-prohibited' % port )