Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 799 2012-02-01 21:16:37Z richard $
|
2 |
# $Id: alcasar.sh 800 2012-02-02 20:19:00Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
|
5 |
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
7 |
|
7 |
|
Line 644... |
Line 644... |
644 |
##########################################################################################
|
644 |
##########################################################################################
|
645 |
AC ()
|
645 |
AC ()
|
646 |
{
|
646 |
{
|
647 |
$SED "s?ifcfg-eth.?ifcfg-$INTIF?g" $DIR_DEST_BIN/alcasar-CA.sh
|
647 |
$SED "s?ifcfg-eth.?ifcfg-$INTIF?g" $DIR_DEST_BIN/alcasar-CA.sh
|
648 |
$DIR_DEST_BIN/alcasar-CA.sh
|
648 |
$DIR_DEST_BIN/alcasar-CA.sh
|
649 |
FIC_VIRTUAL_SSL=`find /etc/httpd/conf -type f -name *default_ssl*`
|
649 |
FIC_VIRTUAL_SSL=`find /etc/httpd/conf -type f -name *default_ssl_vhost.conf`
|
650 |
[ -e /etc/httpd/conf/vhosts-ssl.default ] || cp $FIC_VIRTUAL_SSL /etc/httpd/conf/vhosts-ssl.default
|
650 |
[ -e /etc/httpd/conf/vhosts-ssl.default ] || cp $FIC_VIRTUAL_SSL /etc/httpd/conf/vhosts-ssl.default
|
651 |
$SED "s?localhost.crt?alcasar.crt?g" $FIC_VIRTUAL_SSL
|
651 |
$SED "s?localhost.crt?alcasar.crt?g" $FIC_VIRTUAL_SSL
|
652 |
$SED "s?localhost.key?alcasar.key?g" $FIC_VIRTUAL_SSL
|
652 |
$SED "s?localhost.key?alcasar.key?g" $FIC_VIRTUAL_SSL
|
653 |
$SED "s?^#SSLCertificateChainFile.*?SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt?" $FIC_VIRTUAL_SSL
|
653 |
$SED "s?^#SSLCertificateChainFile.*?SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt?" $FIC_VIRTUAL_SSL
|
654 |
chown -R root:apache /etc/pki
|
654 |
chown -R root:apache /etc/pki
|
Line 1212... |
Line 1212... |
1212 |
filterwin2k
|
1212 |
filterwin2k
|
1213 |
server=$DNS1
|
1213 |
server=$DNS1
|
1214 |
server=$DNS2
|
1214 |
server=$DNS2
|
1215 |
EOF
|
1215 |
EOF
|
1216 |
|
1216 |
|
1217 |
# On modifie le fichier d'initialisation (lancement et arret de la deuxième instance)
|
1217 |
# Init file modification
|
1218 |
[ -e /etc/init.d/dnsmasq.default ] || cp /etc/init.d/dnsmasq /etc/init.d/dnsmasq.default
|
1218 |
[ -e /etc/init.d/dnsmasq.default ] || cp /etc/init.d/dnsmasq /etc/init.d/dnsmasq.default
|
- |
|
1219 |
# Start and stop a 2nd process for the "DNS blackhole"
|
1219 |
$SED "/daemon/a \$dnsmasq -C /etc/dnsmasq-blackhole.conf \$OPTIONS" /etc/init.d/dnsmasq
|
1220 |
$SED "/daemon/a \$dnsmasq -C /etc/dnsmasq-blackhole.conf \$OPTIONS" /etc/init.d/dnsmasq
|
1220 |
$SED "/killproc \$DAEMON_NAME/a killproc \$DAEMON_NAME" /etc/init.d/dnsmasq
|
1221 |
$SED "/killproc \$DAEMON_NAME/a killproc \$DAEMON_NAME" /etc/init.d/dnsmasq
|
- |
|
1222 |
# Start after chilli (65) which create tun0
|
- |
|
1223 |
$SED "s?^# chkconfig:.*?# chkconfig: 2345 99 40?g" /etc/init.d/dnsmasq
|
1221 |
# Optionnellement on active les logs DNS des clients --> traiter les uninstall et update
|
1224 |
# Optionnellement on active les logs DNS des clients
|
1222 |
[ -e /etc/sysconfig/dnsmasq.default ] || cp /etc/sysconfig/dnsmasq /etc/sysconfig/dnsmasq.default
|
1225 |
[ -e /etc/sysconfig/dnsmasq.default ] || cp /etc/sysconfig/dnsmasq /etc/sysconfig/dnsmasq.default
|
1223 |
$SED "s?^OPTIONS=.*?OPTIONS=\"-q --log-facility=/var/log/dnsmasq/queries.log\"?g" /etc/sysconfig/dnsmasq
|
1226 |
$SED "s?^OPTIONS=.*?#OPTIONS=\"-q --log-facility=/var/log/dnsmasq/queries.log\"?g" /etc/sysconfig/dnsmasq
|
1224 |
} # End dnsmasq
|
1227 |
} # End dnsmasq
|
1225 |
|
1228 |
|
1226 |
##########################################################
|
1229 |
##########################################################
|
1227 |
## Fonction BL (BlackList) ##
|
1230 |
## Fonction BL (BlackList) ##
|
1228 |
##########################################################
|
1231 |
##########################################################
|