From 9e96c30a2190da5f647b1205f29f3184ef1738d5 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Sat, 15 Nov 2014 18:00:26 +0100 Subject: [PATCH] firewall6: tracker_torrent -> poubelle --- gestion/gen_confs/firewall6.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/gestion/gen_confs/firewall6.py b/gestion/gen_confs/firewall6.py index ac8dcdda..fb285ec7 100755 --- a/gestion/gen_confs/firewall6.py +++ b/gestion/gen_confs/firewall6.py @@ -41,23 +41,6 @@ Usage: %(script)s restart : Redémarrage du firewall """ % { 'script' : sys.argv[0].split('/')[-1] } -def tracker_torrent(ip6tables): - for tracker in p2p.udp_torrent_tracker: - for dest in gethostbyname(tracker)[1]: - ip6tables.filter.tracker_torrent('-p udp -d %s -j LOG --log-level notice --log-prefix "TRACKER:%s "' % (dest,(tracker[:20]) if len(tracker) > 20 else tracker)) - ip6tables.filter.tracker_torrent('-p udp -d %s -j REJECT --reject-with icmp6-adm-prohibited' % dest) - ip6tables.filter.tracker_torrent('-p udp -j RETURN') - ip6tables.filter.tracker_torrent('-m string --algo kmp ! --string "info_hash=" -j ACCEPT') - ip6tables.filter.tracker_torrent('-m string --algo kmp --string "/scrape?" -j LOG --log-level notice --log-prefix "TRACKER_TORRENT: "') - ip6tables.filter.tracker_torrent('-m string --algo kmp --string "/scrape?" -j REJECT --reject-with icmp6-adm-prohibited') - ip6tables.filter.tracker_torrent('-m string --algo kmp ! --string "peer_id=" -j ACCEPT') - ip6tables.filter.tracker_torrent('-m string --algo kmp ! --string "port=" -j ACCEPT') - ip6tables.filter.tracker_torrent('-m string --algo kmp ! --string "uploaded=" -j ACCEPT') - ip6tables.filter.tracker_torrent('-m string --algo kmp ! --string "downloaded=" -j ACCEPT') - ip6tables.filter.tracker_torrent('-m string --algo kmp ! --string "left=" -j ACCEPT') - ip6tables.filter.tracker_torrent('-j LOG --log-level notice --log-prefix "TRACKER_TORRENT: "') - ip6tables.filter.tracker_torrent('-j REJECT --reject-with icmp6-adm-prohibited') - def ports(dev_ip6, dev_list): ''' Ouvre les ports ''' for machine in machines :