firewall6: tracker_torrent -> poubelle
This commit is contained in:
parent
a1926c8dad
commit
9e96c30a21
1 changed files with 0 additions and 17 deletions
|
@ -41,23 +41,6 @@ Usage:
|
||||||
%(script)s restart : Redémarrage du firewall
|
%(script)s restart : Redémarrage du firewall
|
||||||
""" % { 'script' : sys.argv[0].split('/')[-1] }
|
""" % { '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):
|
def ports(dev_ip6, dev_list):
|
||||||
''' Ouvre les ports '''
|
''' Ouvre les ports '''
|
||||||
for machine in machines :
|
for machine in machines :
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue