[firewall6.py,ipt.py] Filtrage partiel des trackers bittorent en ipv6
darcs-hash:20120104125344-3a55a-3ad728a7016e6df7cbe4590f0a5ae80eb930e286.gz
This commit is contained in:
parent
81f9ae2c9e
commit
50ab65b27f
2 changed files with 26 additions and 1 deletions
|
@ -104,6 +104,7 @@ class Table(object):
|
|||
self.blacklist_dst = Chain()
|
||||
self.srv_out_adm = Chain()
|
||||
self.ingress_filtering = Chain()
|
||||
self.tracker_torrent = Chain()
|
||||
|
||||
class Ip6tables(object):
|
||||
''' Classe pour '''
|
||||
|
@ -716,6 +717,7 @@ def mac_ip(ipt, machines, types_machines):
|
|||
|
||||
ipt.filter.ieui64('-s fe80::/64 -m eui64 -j RETURN')
|
||||
ipt.filter.ieui64('-j DROP')
|
||||
#ipt.filter.ieui64('-j REJECT')
|
||||
|
||||
def macips(ipt, machines, types_machines):
|
||||
''' Construit la chaîne MAC '''
|
||||
|
@ -727,6 +729,7 @@ def macips(ipt, machines, types_machines):
|
|||
for type_m in types_machines:
|
||||
type_mm = re.sub('-', '', type_m)
|
||||
eval('ipt.filter.mac' + type_mm)('-j DROP')
|
||||
#eval('ipt.filter.mac' + type_mm)('-j REJECT')
|
||||
return 0
|
||||
|
||||
def ingress_filtering(ipt):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue