[config,firewall_new, firewall6] On pousse de la conf commune à firewall_new et firewall6 dans config
Ignore-this: d132731f820f32809f1690716ccff1da darcs-hash:20121209173407-3a55a-73c9883fdebfe7aaf71f6bbb2a0fc83306f98fbc.gz
This commit is contained in:
parent
f8332851b4
commit
6e27d6a09a
3 changed files with 15 additions and 22 deletions
|
@ -37,7 +37,7 @@ from ldap_crans import AssociationCrans, Machine, MachineWifi, BorneWifi
|
|||
from affich_tools import *
|
||||
from commands import getstatusoutput
|
||||
from iptools import AddrInNet, NetSubnets, IpSubnet
|
||||
from config import NETs, mac_komaz, mac_wifi, mac_titanic, mac_g, conf_fw, p2p, vlans, debit_max_radin, adm_users, accueil_route, blacklist_sanctions, blacklist_sanctions_soft, periode_transitoire
|
||||
from config import NETs, mac_komaz, mac_wifi, mac_titanic, mac_g, conf_fw, p2p, vlans, debit_max_radin, adm_users, accueil_route, blacklist_sanctions, blacklist_sanctions_soft, periode_transitoire, udp_torrent_tracker
|
||||
from ipset import IpsetError, Ipset
|
||||
from lc_ldap import lc_ldap
|
||||
from ipt import gethostbyname
|
||||
|
@ -474,15 +474,6 @@ class firewall_komaz(firewall_crans) :
|
|||
filtres_p2p_bloq = [
|
||||
]
|
||||
|
||||
udp_torrent_tracker={
|
||||
'tracker.openbittorrent.com':gethostbyname('tracker.openbittorrent.com')[0],
|
||||
'tracker.ccc.de':gethostbyname('tracker.ccc.de')[0],
|
||||
'tracker.istole.it':gethostbyname('tracker.istole.it')[0],
|
||||
'tracker.publicbt.com':gethostbyname('tracker.publicbt.com')[0],
|
||||
'tracker.1337x.org':gethostbyname('tracker.1337x.org')[0],
|
||||
'fr33domtracker.h33t.com':gethostbyname('fr33domtracker.h33t.com')[0],
|
||||
}
|
||||
|
||||
|
||||
ports_p2p = [ '412', '1214', '4662:4665' , '6346:6347', '6699', '6881:6889' ]
|
||||
|
||||
|
@ -1192,8 +1183,8 @@ class firewall_komaz(firewall_crans) :
|
|||
iptables('-A FILTRE_P2P -m ipp2p --%s -j REJECT --reject-with icmp-admin-prohibited' % filtre[0])
|
||||
self.anim.cycle()
|
||||
#on rejetes les trackeur udp les plus connus
|
||||
for tracker in self.udp_torrent_tracker.keys():
|
||||
for dest in self.udp_torrent_tracker[tracker]:
|
||||
for tracker in udp_torrent_tracker:
|
||||
for dest in gethostbyname(tracker)[0]:
|
||||
iptables('-A FILTRE_P2P -p udp -d %s -j LOG --log-level notice --log-prefix "TRACKER:%s "' % (dest,(tracker[:20]) if len(tracker) > 20 else tracker))
|
||||
iptables('-A FILTRE_P2P -p udp -d %s -j REJECT --reject-with icmp-admin-prohibited' % dest)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue