[ipt,firewall6,firewall_new] Mise à jour du blocage des tracker torrent udp, les port 445 et 135 sont retirer du trigger VIRUS (mais toujours bloqués)

Ignore-this: ea68ea4670ec109a2575a243c2e89ca6

darcs-hash:20121209172425-3a55a-3fb45d35a11fc552e0c1e786d181334272913123.gz
This commit is contained in:
Valentin Samir 2012-12-09 18:24:25 +01:00
parent 8661234205
commit f8332851b4
3 changed files with 37 additions and 16 deletions

View file

@ -20,7 +20,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os, re, syslog, cPickle
import os, re, syslog, cPickle, socket
from ldap_crans import crans_ldap, hostname
from commands import getstatusoutput
@ -69,6 +69,18 @@ db = crans_ldap()
#
##############################################################################
def gethostbyname(hostname):
hosts4=[]
hosts6=[]
try :
for host in socket.getaddrinfo(hostname,None,socket.AF_INET,socket.IPPROTO_IP,socket.AI_CANONNAME):
hosts4.append(host[4][0])
except(socket.gaierror): pass
try :
for host in socket.getaddrinfo(hostname,None,socket.AF_INET6,socket.IPPROTO_IP,socket.AI_CANONNAME):
hosts6.append(host[4][0])
except(socket.gaierror): pass
return (hosts4,hosts6)
class Chain(object):
''' Classe regroupant toutes les règles du firewall '''