Le wifi ne passe pas dans les filtres P2P

darcs-hash:20050217101955-d1718-7793e756dd119e1ebf5b02bbe24ea21526132215.gz
This commit is contained in:
bernat 2005-02-17 11:19:55 +01:00
parent 12d663af05
commit 7a4409df1a

View file

@ -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 )