[firewall_new,config,firewall6,generate,ipt] On rediriges les machines blacklisté vers routeur
Ignore-this: fc33fe2ea8d2c37c48b52d3e70443231 Pour ça, generate doit regénérer la chaine BLACKLIST_SOFT du firewall pour tout type de blacklist. On on utilise plus le squid de sable, on néttoie les fonctions en question dans generate. Pour rediriger vers routeur, un utilise le nginx de komaz comme relais, cf commit du 09/11/2012. darcs-hash:20121111154240-3a55a-6d7b39b7797ff6950f18e436d7cfd187f31c4656.gz
This commit is contained in:
parent
bc8061ce62
commit
977d281c56
4 changed files with 27 additions and 76 deletions
|
@ -25,12 +25,14 @@ import os, re, syslog, cPickle
|
|||
from ldap_crans import crans_ldap, hostname
|
||||
from commands import getstatusoutput
|
||||
from config import NETs, role, prefix, mid, output_file, filter_policy
|
||||
from config import blacklist_sanctions, file_pickle
|
||||
from config import blacklist_sanctions, blacklist_sanctions_soft, file_pickle
|
||||
from iptools import AddrInNet
|
||||
from midtools import Mid
|
||||
import subprocess
|
||||
import netaddr
|
||||
|
||||
blacklist_sanctions.extend(blacklist_sanctions_soft)
|
||||
|
||||
Mangle_policy = """
|
||||
*mangle
|
||||
:PREROUTING ACCEPT [0:0]
|
||||
|
@ -161,6 +163,7 @@ ACCEPT' % (dev, proto, ip, port))
|
|||
ip = ipv6_addr(machine.mac(), type_m)
|
||||
mac=machine.mac()
|
||||
break
|
||||
|
||||
if ip:
|
||||
self.filter.blacklist_src('-m mac --mac-source %s -j REJECT --reject-with icmp6-port-unreachable' % mac)
|
||||
#~ self.filter.blacklist_src('-s %s -j REJECT --reject-with \
|
||||
|
@ -664,7 +667,7 @@ def blacklist(ipt):
|
|||
|
||||
blcklst = []
|
||||
|
||||
s = db.search('ablacklist=*&paiement=ok')
|
||||
s = db.search('paiement=ok')
|
||||
|
||||
for target in s['adherent'] + s['club']:
|
||||
sanctions = target.blacklist_actif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue