[firewall4] La liste d'ip donnée par générate est incomplète
This commit is contained in:
parent
d447b9546b
commit
dd83999ddd
2 changed files with 11 additions and 5 deletions
|
@ -282,7 +282,8 @@ class firewall_base(object) :
|
||||||
|
|
||||||
def blacklist_maj(self, ips):
|
def blacklist_maj(self, ips):
|
||||||
"""Met à jours les blacklists pour les ip présentent dans la liste ``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):
|
def raw_table(self):
|
||||||
"""Génère les règles pour la table ``raw`` et remplis les chaines de la table"""
|
"""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):
|
def blacklist_maj(self, ips):
|
||||||
self.blacklist_hard_maj(ips)
|
#self.blacklist_hard_maj(ips)
|
||||||
self.blacklist_soft_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):
|
def raw_table(self):
|
||||||
return
|
return
|
||||||
|
@ -1061,7 +1066,8 @@ class firewall_zamok(firewall_base):
|
||||||
def blacklist_maj(self, ips):
|
def blacklist_maj(self, ips):
|
||||||
anim('\tMise à jour des blacklists')
|
anim('\tMise à jour des blacklists')
|
||||||
self.blacklist_output('filter', apply=True)
|
self.blacklist_output('filter', apply=True)
|
||||||
self.blacklist_hard_maj(ips)
|
#self.blacklist_hard_maj(ips)
|
||||||
|
self.reload('blacklist_hard')
|
||||||
print OK
|
print OK
|
||||||
|
|
||||||
def blacklist_output(self, table=None, apply=False):
|
def blacklist_output(self, table=None, apply=False):
|
||||||
|
|
|
@ -96,7 +96,7 @@ class Ipset(object):
|
||||||
self.flush()
|
self.flush()
|
||||||
if self.squeeze:
|
if self.squeeze:
|
||||||
self.destroy()
|
self.destroy()
|
||||||
except IpsetError: pass
|
except IpsetError as error: sys.stderr.write("%s\n" % error)
|
||||||
cmd="cat %s | %s -R" % (path,self.ipset)
|
cmd="cat %s | %s -R" % (path,self.ipset)
|
||||||
status,output=commands.getstatusoutput(cmd)
|
status,output=commands.getstatusoutput(cmd)
|
||||||
if status:
|
if status:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue