From dd83999ddd6c3a93aca0babf634f9fe2d339609b Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Wed, 1 May 2013 17:58:23 +0200 Subject: [PATCH] =?UTF-8?q?[firewall4]=20La=20liste=20d'ip=20donn=C3=A9e?= =?UTF-8?q?=20par=20g=C3=A9n=C3=A9rate=20est=20incompl=C3=A8te?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/gen_confs/firewall4.py | 14 ++++++++++---- gestion/gen_confs/ipset.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gestion/gen_confs/firewall4.py b/gestion/gen_confs/firewall4.py index 56903ec9..2b77cec4 100755 --- a/gestion/gen_confs/firewall4.py +++ b/gestion/gen_confs/firewall4.py @@ -282,7 +282,8 @@ class firewall_base(object) : def blacklist_maj(self, ips): """Met à jours les blacklists pour les ip présentent dans la liste ``ips``""" - self.blacklist_hard_maj(ips) + #self.blacklist_hard_maj(ips) + self.reload('blacklist_hard') def raw_table(self): """Génère les règles pour la table ``raw`` et remplis les chaines de la table""" @@ -500,8 +501,12 @@ class firewall_komaz(firewall_base_routeur): }) def blacklist_maj(self, ips): - self.blacklist_hard_maj(ips) - self.blacklist_soft_maj(ips) + #self.blacklist_hard_maj(ips) + #self.blacklist_soft_maj(ips) + #self.blacklist_upload_maj(ips) + self.reload('blacklist_hard') + self.reload('blacklist_soft') + self.reload('blacklist_upload') def raw_table(self): return @@ -1061,7 +1066,8 @@ class firewall_zamok(firewall_base): def blacklist_maj(self, ips): anim('\tMise à jour des blacklists') self.blacklist_output('filter', apply=True) - self.blacklist_hard_maj(ips) + #self.blacklist_hard_maj(ips) + self.reload('blacklist_hard') print OK def blacklist_output(self, table=None, apply=False): diff --git a/gestion/gen_confs/ipset.py b/gestion/gen_confs/ipset.py index ecaf9989..128db479 100644 --- a/gestion/gen_confs/ipset.py +++ b/gestion/gen_confs/ipset.py @@ -96,7 +96,7 @@ class Ipset(object): self.flush() if self.squeeze: self.destroy() - except IpsetError: pass + except IpsetError as error: sys.stderr.write("%s\n" % error) cmd="cat %s | %s -R" % (path,self.ipset) status,output=commands.getstatusoutput(cmd) if status: