[Mails] Bye bye rouge
Ignore-this: 41f78b2bd4df9b4411c032a4169574be darcs-hash:20120802160424-ab199-b3db7d18ed58b1e64d8dba4ee919e6870f4457a8.gz
This commit is contained in:
parent
7fcc468cab
commit
b7e9acf9f1
13 changed files with 40 additions and 52 deletions
|
@ -1,5 +1,8 @@
|
|||
#! /bin/sh
|
||||
|
||||
echo "Ce script ne doit plus être utilisé."
|
||||
exit 1
|
||||
|
||||
if [[ `hostname` != rouge ]] ; then
|
||||
echo "L'analyse des logs d'upload doit se faire sur rouge"
|
||||
exit 1
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#! /bin/sh
|
||||
|
||||
echo "Ce script ne doit plus être utilisé."
|
||||
exit 1
|
||||
|
||||
if [[ $1 = "--help" || $1 = "-h" ]]
|
||||
then
|
||||
echo "Ce script permet de mettre à jour simplement les serveurs du crans.
|
||||
|
|
|
@ -86,7 +86,7 @@ class del_user:
|
|||
def reconfigure(self):
|
||||
if hostname == "fx":
|
||||
self.delete_fx()
|
||||
elif hostname == "rouge":
|
||||
elif hostname == "owl":
|
||||
self.delete_directory(u"Suppression des fichiers index de dovecot",
|
||||
"/var/dovecot-indexes/%s")
|
||||
elif hostname == "zamok":
|
||||
|
|
|
@ -68,18 +68,18 @@ la base LDAP
|
|||
}
|
||||
### Liste DNS
|
||||
# Le premier doit être le maitre
|
||||
DNSs = ['sable.crans.org', 'charybde.crans.org', 'freebox.crans.org', 'ovh.crans.org', 'rouge.crans.org' ]
|
||||
DNSs = ['sable.crans.org', 'charybde.crans.org', 'freebox.crans.org', 'ovh.crans.org']
|
||||
DNSs_private = ['vert.adm.crans.org']
|
||||
ip_master_DNS = "10.231.136.9"
|
||||
|
||||
### Liste des délégations de zone
|
||||
# Pour les demandes de ces zones, le DNS dira d'aller voir les serveurs listés ici
|
||||
# Pour les noms des serveurs on met l'IP sans point ou le nom avec un point
|
||||
DELEG = { 'tv.crans.org' : ['rouge.crans.org.' , 'charybde.crans.org.' , 'freebox.crans.org.', 'sable.crans.org.' , 'mdr.crans.org.'] }
|
||||
DELEG = { 'tv.crans.org' : ['charybde.crans.org.' , 'freebox.crans.org.', 'sable.crans.org.' , 'mdr.crans.org.'] }
|
||||
|
||||
### Serveurs de mail
|
||||
# format : [ priorité serveur , .... ]
|
||||
MXs = ['10 rouge.crans.org', '11 redisdead.crans.org', '20 ovh.crans.org', '20 freebox.crans.org']
|
||||
MXs = ['10 redisdead.crans.org', '20 ovh.crans.org', '20 freebox.crans.org']
|
||||
SRVs = ['_jabber._tcp.crans.org. 86400 IN SRV 5 0 5269 xmpp.crans.org.',
|
||||
'_xmpp-server._tcp.crans.org. 86400 IN SRV 5 0 5269 xmpp.crans.org.',
|
||||
'_xmpp-client._tcp.crans.org. 86400 IN SRV 5 0 5222 xmpp.crans.org.']
|
||||
|
|
|
@ -27,11 +27,6 @@ class dhcp(gen_config) :
|
|||
else :
|
||||
DHCPD_CONF = '/etc/dhcp3/dhcpd.conf'
|
||||
|
||||
# Options générales
|
||||
if hostname == 'rouge' :
|
||||
base_conf = """option option-252 code 252 = text ;
|
||||
option option-119 code 119 = text ;
|
||||
"""
|
||||
# Hotspot ENS plus utilisé...
|
||||
# elif hostname == 'ragnarok' :
|
||||
# On rajoute les IP dynamiques
|
||||
|
|
|
@ -1275,7 +1275,7 @@ class firewall_zamok(firewall_crans) :
|
|||
Rouge
|
||||
"""
|
||||
|
||||
class firewall_rouge(firewall_crans) :
|
||||
class firewall_redisdead(firewall_crans) :
|
||||
"""
|
||||
Structure du firewall :
|
||||
table filter :
|
||||
|
@ -1288,7 +1288,7 @@ class firewall_rouge(firewall_crans) :
|
|||
|
||||
# interfaces physiques
|
||||
eth_pub = "eth0"
|
||||
eth_adm = "eth0.2"
|
||||
eth_adm = "eth1"
|
||||
|
||||
def filter_table(self) :
|
||||
self.anim = anim('\tStructure de la table filter')
|
||||
|
@ -1302,7 +1302,7 @@ class firewall_rouge(firewall_crans) :
|
|||
print OK
|
||||
|
||||
def filter_table_tweaks(self) :
|
||||
self.anim = anim('\tRègles spécifiques à rouge')
|
||||
self.anim = anim('\tRègles spécifiques à redisdead')
|
||||
iptables("-P INPUT ACCEPT")
|
||||
iptables("-P FORWARD DROP")
|
||||
print OK
|
||||
|
@ -1348,7 +1348,7 @@ class firewall_vert(firewall_crans) :
|
|||
iptables("-P FORWARD DROP")
|
||||
print OK
|
||||
|
||||
class firewall_sable(firewall_rouge):
|
||||
class firewall_sable(firewall_redisdead):
|
||||
"""Comme pour rouge, avec le proxy transparent en plus"""
|
||||
|
||||
def mangle_table(self):
|
||||
|
@ -1363,7 +1363,7 @@ class firewall_sable(firewall_rouge):
|
|||
|
||||
|
||||
def nat_table(self):
|
||||
firewall_rouge.nat_table(self)
|
||||
firewall_redisdead.nat_table(self)
|
||||
# Proxy transparent pour le filiaire
|
||||
iptables("-t nat -I PREROUTING -i eth0.2 -m mark --mark %s -j ACCEPT" % conf_fw.mark['proxy'])
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ make_lock('auto_generate', 'Big lock', nowait=1)
|
|||
|
||||
class base_reconfigure:
|
||||
__service_develop = {
|
||||
'macip': [ 'rouge-macip', 'zamok-macip', 'sable-macip', 'komaz-macip', 'gordon-macip',
|
||||
'macip': [ 'redisdead-macip', 'zamok-macip', 'sable-macip', 'komaz-macip', 'gordon-macip',
|
||||
'sable-blacklist_check' ],
|
||||
# 'droits': [ 'rouge-droits', 'ragnarok-droits' ],
|
||||
'blacklist_upload': [ 'sable-blacklist_upload', 'komaz-blacklist', 'zamok-blacklist' ],
|
||||
|
@ -48,7 +48,7 @@ class base_reconfigure:
|
|||
'blacklist_autodisc_upload': [ 'sable-blacklist_autodisc_upload', 'komaz-blacklist', 'zamok-blacklist'],
|
||||
'blacklist_autodisc_p2p': [ 'sable-blacklist_autodisc_p2p', 'komaz-blacklist', 'zamok-blacklist'],
|
||||
'blacklist_bloq': [ 'komaz-blacklist', 'sable-blacklist_bloq', 'zamok-blacklist', 'dns' ],
|
||||
'del_user': [ 'fx-del_user', 'rouge-del_user', 'zamok-del_user' ]
|
||||
'del_user': [ 'fx-del_user', 'owl-del_user', 'zamok-del_user' ]
|
||||
}
|
||||
|
||||
def __init__(self, to_do=None):
|
||||
|
@ -149,15 +149,9 @@ class redisdead(base_reconfigure):
|
|||
from adherents import ML_ens
|
||||
self._do(ML_ens(mails))
|
||||
|
||||
|
||||
class rouge(base_reconfigure):
|
||||
def autostatus(self):
|
||||
from autostatus import autostatus
|
||||
self._do(autostatus())
|
||||
|
||||
# def dhcp(self):
|
||||
# from gen_confs.dhcpd import dhcp
|
||||
# self._do(dhcp(), self._machines())
|
||||
def mail_ajout_droits(self, args):
|
||||
from adherents import mail_ajout_droits
|
||||
self._do(mail_ajout_droits(args))
|
||||
|
||||
def mail_modif(self, trucs):
|
||||
"""
|
||||
|
@ -171,19 +165,21 @@ class rouge(base_reconfigure):
|
|||
from gen_confs.supervison import mail_solde
|
||||
self._do(mail_solde(modifs))
|
||||
|
||||
def switch(self, chambres):
|
||||
from gen_confs.switchs import switch
|
||||
self._do(switch(chambres))
|
||||
class rouge(base_reconfigure):
|
||||
def autostatus(self):
|
||||
from autostatus import autostatus
|
||||
self._do(autostatus())
|
||||
|
||||
# def dhcp(self):
|
||||
# from gen_confs.dhcpd import dhcp
|
||||
# self._do(dhcp(), self._machines())
|
||||
|
||||
class owl(base_reconfigure):
|
||||
def del_user(self, args):
|
||||
# Suppression des fichiers index de dovecot
|
||||
from adherents import del_user
|
||||
self._do(del_user(args))
|
||||
|
||||
def mail_ajout_droits(self, args):
|
||||
from adherents import mail_ajout_droits
|
||||
self._do(mail_ajout_droits(args))
|
||||
|
||||
class pgsql(base_reconfigure):
|
||||
def surveillance_exemptions(self):
|
||||
from gen_confs.surveillance import exemptions
|
||||
|
|
|
@ -27,7 +27,7 @@ cron_plugins = {
|
|||
}
|
||||
|
||||
# Hôtes pour lesquels le firewall est muninisé
|
||||
munin_fw = sorted(["zamok", "rouge", "komaz", "sable", "gordon"])
|
||||
munin_fw = sorted(["zamok", "redisdead", "komaz", "sable", "gordon"])
|
||||
|
||||
hosts_plugins = {
|
||||
"zamok": {
|
||||
|
@ -42,8 +42,7 @@ hosts_plugins = {
|
|||
"slapd_bdb_cache_pages": "slapd_bdb_cache_",
|
||||
"slapd_bdb_cache_percent": "slapd_bdb_cache_",
|
||||
},
|
||||
"rouge": {
|
||||
"amavis": "amavis",
|
||||
"redisdead": {
|
||||
"machines": "machines",
|
||||
# "webalizer_dixans": "webalizer_",
|
||||
# "webalizer_install-party": "webalizer_",
|
||||
|
|
|
@ -31,8 +31,7 @@ ETAT_MAITRE = os.path.join(SECOURS_PATH, "etat_maitre")
|
|||
### Fichiers à modifier, chaine indiquant un commentaire dans ceux-ci
|
||||
### et commandes à excécuter après édition
|
||||
FICHIERS = {
|
||||
'rouge': {
|
||||
'/etc/bind/named.conf.options': '//',
|
||||
'redisdead': {
|
||||
'/etc/postfix/main.cf': '#',
|
||||
},
|
||||
'sable': {
|
||||
|
@ -51,9 +50,8 @@ FICHIERS = {
|
|||
}.get(HOSTNAME, {})
|
||||
|
||||
COMMANDES = {
|
||||
'rouge': [
|
||||
'redisdead': [
|
||||
'/etc/init.d/postfix restart',
|
||||
'/etc/init.d/bind9 reload',
|
||||
],
|
||||
'sable': [
|
||||
'/etc/init.d/squid3 reload',
|
||||
|
|
|
@ -113,7 +113,7 @@ def recoit(paquet):
|
|||
# On affiche
|
||||
print "Réception de : ", paquet.summary()
|
||||
# On verifie que c'est bien ce qu'on attend
|
||||
if paquet.getlayer(Ether).dst.upper() == globals()['mac'] and paquet.haslayer(BOOTP) and paquet.getlayer(BOOTP).op == 2 and paquet.getlayer(IP).src != '138.231.136.3':
|
||||
if paquet.getlayer(Ether).dst.upper() == globals()['mac'] and paquet.haslayer(BOOTP) and paquet.getlayer(BOOTP).op == 2 and paquet.getlayer(IP).src != '138.231.136.39':
|
||||
# DHCP pirate ?
|
||||
msg = "DHCP pirate ? (%s)" % paquet.getlayer(Ether).src
|
||||
print msg
|
||||
|
|
|
@ -24,8 +24,7 @@ $TTL 86400
|
|||
)
|
||||
|
||||
@ IN NS mdr.crans.org.
|
||||
@ IN NS rouge.crans.org.
|
||||
@ IN NS sila.crans.org.
|
||||
@ IN NS charybde.crans.org.
|
||||
@ IN NS freebox.crans.org.
|
||||
|
||||
@ IN A 138.231.136.243
|
||||
|
@ -44,8 +43,7 @@ $TTL 86400
|
|||
)
|
||||
|
||||
@ IN NS mdr.crans.org.
|
||||
@ IN NS rouge.crans.org.
|
||||
@ IN NS sila.crans.org.
|
||||
@ IN NS charybde.crans.org.
|
||||
@ IN NS freebox.crans.org.
|
||||
|
||||
";
|
||||
|
|
|
@ -39,8 +39,7 @@ $serial ; numero de serie
|
|||
)
|
||||
|
||||
@ IN NS mdr.crans.org.
|
||||
@ IN NS rouge.crans.org.
|
||||
@ IN NS sila.crans.org.
|
||||
@ IN NS charybde.crans.org.
|
||||
@ IN NS freebox.crans.org.
|
||||
|
||||
@ IN A 138.231.136.243
|
||||
|
@ -58,8 +57,7 @@ $serial ; numero de serie
|
|||
)
|
||||
|
||||
@\tIN\tNS mdr.crans.org.
|
||||
@\tIN\tNS rouge.crans.org.
|
||||
@\tIN\tNS sila.crans.org.
|
||||
@\tIN\tNS charybde.crans.org.
|
||||
@\tIN\tNS freebox.crans.org.
|
||||
|
||||
";
|
||||
|
|
|
@ -18,8 +18,7 @@ $(date +%s) ; numero de serie
|
|||
|
||||
; DNS de la zone par ordre de priorité
|
||||
@ IN NS mdr.crans.org.
|
||||
@ IN NS rouge.crans.org.
|
||||
@ IN NS sila.crans.org.
|
||||
@ IN NS charybde.crans.org.
|
||||
@ IN NS freebox.crans.org.
|
||||
|
||||
@ IN A 138.231.136.243
|
||||
|
@ -41,8 +40,7 @@ $(date +%s) ; numero de serie
|
|||
|
||||
; DNS de la zone par ordre de priorité
|
||||
@ IN NS mdr.crans.org.
|
||||
@ IN NS rouge.crans.org.
|
||||
@ IN NS sila.crans.org.
|
||||
@ IN NS charybde.crans.org.
|
||||
@ IN NS freebox.crans.org.
|
||||
|
||||
EOF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue