1,3 → 1,4 |
|
#!/bin/bash |
# $Id$ |
|
120,8 → 121,18 |
then echo -n "Tests des paramètres réseau : " |
else echo -n "Network parameters tests : " |
fi |
# We test gw |
if [ "$EXTIF" == "" ] |
then |
if [ $Lang == "fr" ] |
then |
echo "L'adresse du routeur n'est pas configuré" |
else |
echo "The gateway address isn't set" |
fi |
exit 0 |
fi |
# We test EXTIF config files |
|
PUBLIC_IP=`grep IPADDR /etc/sysconfig/network-scripts/ifcfg-$EXTIF|cut -d"=" -f2` |
PUBLIC_GATEWAY=`grep GATEWAY /etc/sysconfig/network-scripts/ifcfg-$EXTIF|cut -d"=" -f2` |
if [ `echo $PUBLIC_IP|wc -c` -lt 7 ] || [ `echo $PUBLIC_GATEWAY|wc -c` -lt 7 ] |
1265,7 → 1276,8 |
address=/#/$PRIVATE_IP |
EOF |
# Create dnsmasq-blacklist and dnsmasq-whitelist unit |
cp -f /lib/systemd/system/dnsmasq.service /lib/systemd/system/dnsmasq-blacklist.service /lib/systemd/system/dnsmasq-whitelist.service |
cp -f /lib/systemd/system/dnsmasq.service /lib/systemd/system/dnsmasq-blacklist.service |
cp -f /lib/systemd/system/dnsmasq.service /lib/systemd/system/dnsmasq-whitelist.service |
$SED "s?^ExecStart=.*?ExecStart=/usr/bin/dnsmasq -C /etc/dnsmasq-blacklist.conf?g" /lib/systemd/system/dnsmasq-blacklist.service |
$SED "s?^ExecStart=.*?ExecStart=/usr/bin/dnsmasq -C /etc/dnsmasq-whitelist.conf?g" /lib/systemd/system/dnsmasq-whitelist.service |
# TODO Start after chilli which create tun0 |
1511,7 → 1523,7 |
for i in alcasar-load_balancing nfsen mysqld httpd ntpd iptables ulogd dnsmasq radiusd dansguardian freshclam |
|
do |
systemctl enable $i |
systemctl -q enable $i |
done |
# Apply French Security Agency (ANSSI) rules |
# ignorer les broadcast ICMP. (attaque smurf) |
1523,7 → 1535,7 |
accept_redirect=`grep accept_redirect /etc/sysctl.conf|wc -l` |
if [ "$accept_redirect" == "0" ] |
then |
echo "net.ipv4.conf.all.accept_redirects = 0" >> /etc/sysctl.conf |
echo "net.ipv4.conf.all.accept_redirects = 0" >> /etc/sysctl.d/alcasar.conf |
else |
$SED "s?accept_redirects.*?accept_redirects = 0?g" /etc/sysctl.conf |
fi |
1860,7 → 1872,7 |
for func in init network ACC CA init_db param_radius param_web_radius param_chilli param_dansguardian antivirus param_ulogd param_nfsen param_dnsmasq BL cron fail2ban post_install |
do |
$func |
# echo "*** 'debug' : end of function $func ***"; read a |
echo "*** 'debug' : end of function $func ***"; read a |
done |
;; |
-u | --uninstall) |