Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1508 2014-11-30 18:19:16Z richard $
|
2 |
# $Id: alcasar.sh 1509 2014-11-30 22:45:38Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
|
5 |
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
Line 1310... |
Line 1310... |
1310 |
$SED "s?^#Listen.*?Listen $PRIVATE_IP?g" /etc/tinyproxy/tinyproxy.conf # Listen NIC (only intif)
|
1310 |
$SED "s?^#Listen.*?Listen $PRIVATE_IP?g" /etc/tinyproxy/tinyproxy.conf # Listen NIC (only intif)
|
1311 |
$SED "s?^#LogFile.*?LogFile \"/var/log/tinyproxy/tinyproxy.log\"?g" /etc/tinyproxy/tinyproxy.conf
|
1311 |
$SED "s?^#LogFile.*?LogFile \"/var/log/tinyproxy/tinyproxy.log\"?g" /etc/tinyproxy/tinyproxy.conf
|
1312 |
$SED "s?^LogLevel.*?LogLevel Error?g" /etc/tinyproxy/tinyproxy.conf # Only errors are logged
|
1312 |
$SED "s?^LogLevel.*?LogLevel Error?g" /etc/tinyproxy/tinyproxy.conf # Only errors are logged
|
1313 |
$SED "s?^#Upstream.*?Upstream 127.0.0.1:8090?g" /etc/tinyproxy/tinyproxy.conf # forward to HAVP
|
1313 |
$SED "s?^#Upstream.*?Upstream 127.0.0.1:8090?g" /etc/tinyproxy/tinyproxy.conf # forward to HAVP
|
1314 |
$SED "s?^#DisableViaHeader.*?DisableViaHeader Yes?g" /etc/tinyproxy/tinyproxy.conf # Stealth mode
|
1314 |
$SED "s?^#DisableViaHeader.*?DisableViaHeader Yes?g" /etc/tinyproxy/tinyproxy.conf # Stealth mode
|
- |
|
1315 |
# Create the systemd unit
|
- |
|
1316 |
cat << EOF > /lib/systemd/system/tinyproxy.service
|
- |
|
1317 |
# This file is part of systemd.
|
- |
|
1318 |
#
|
- |
|
1319 |
# systemd is free software; you can redistribute it and/or modify it
|
- |
|
1320 |
# under the terms of the GNU General Public License as published by
|
- |
|
1321 |
# the Free Software Foundation; either version 2 of the License, or
|
- |
|
1322 |
# (at your option) any later version.
|
- |
|
1323 |
|
- |
|
1324 |
# This unit launches tinyproxy (a very light proxy).
|
- |
|
1325 |
[Unit]
|
- |
|
1326 |
Description=Tinyproxy Web Proxy Server
|
- |
|
1327 |
After=network.target iptables.service
|
- |
|
1328 |
|
- |
|
1329 |
[Service]
|
- |
|
1330 |
Type=forking
|
- |
|
1331 |
ExecStart=/usr/sbin/tinyproxy -c /etc/tinyproxy/tinyproxy.conf
|
- |
|
1332 |
|
- |
|
1333 |
[Install]
|
- |
|
1334 |
WantedBy=multi-user.target
|
- |
|
1335 |
EOF
|
1315 |
|
1336 |
|
1316 |
} # end of tinyproxy
|
1337 |
} # end of tinyproxy
|
1317 |
##################################################################################
|
1338 |
##################################################################################
|
1318 |
## function "ulogd" ##
|
1339 |
## function "ulogd" ##
|
1319 |
## - Ulog config for multi-log files ##
|
1340 |
## - Ulog config for multi-log files ##
|
Line 1413... |
Line 1434... |
1413 |
$SED "s?'\$ziparg $extensions.*?\$ziparg $extensions -b 127.0.0.1;'?g" /usr/libexec/NfSenRC.pm
|
1434 |
$SED "s?'\$ziparg $extensions.*?\$ziparg $extensions -b 127.0.0.1;'?g" /usr/libexec/NfSenRC.pm
|
1414 |
# expire delay for the profile "live"
|
1435 |
# expire delay for the profile "live"
|
1415 |
systemctl start nfsen
|
1436 |
systemctl start nfsen
|
1416 |
/bin/nfsen -m live -e 62d 2>/dev/null
|
1437 |
/bin/nfsen -m live -e 62d 2>/dev/null
|
1417 |
# add SURFmap plugin
|
1438 |
# add SURFmap plugin
|
1418 |
tar xzf $DIR_CONF/nfsen/SURFmap_v3.3.1.tar.gz -C /tmp/
|
1439 |
cp $DIR_CONF/nfsen/SURFmap_v3.3.1.tar.gz /tmp/
|
- |
|
1440 |
tar xzf /tmp/SURFmap_v3.3.1.tar.gz -C /tmp/
|
1419 |
cp $DIR_CONF/nfsen/install-surfmap.sh /tmp/SURFmap/install.sh
|
1441 |
cp $DIR_CONF/nfsen/GeoLiteCity* /tmp/SURFmap/
|
1420 |
cd /tmp/SURFmap
|
1442 |
cd /tmp/SURFmap/
|
1421 |
/usr/bin/sh install.sh
|
1443 |
/usr/bin/sh install.sh
|
1422 |
|
1444 |
|
1423 |
# clear the installation
|
1445 |
# clear the installation
|
1424 |
cd $DirTmp
|
1446 |
cd $DirTmp
|
1425 |
rm -rf /tmp/nfsen-1.3.6p1/
|
1447 |
rm -rf /tmp/nfsen*
|
1426 |
rm -rf /tmp/SURFmap/
|
1448 |
rm -rf /tmp/SURFmap*
|
1427 |
} # End of nfsen ()
|
1449 |
} # End of nfsen ()
|
1428 |
|
1450 |
|
1429 |
##################################################
|
1451 |
##################################################
|
1430 |
## Function "dnsmasq" ##
|
1452 |
## Function "dnsmasq" ##
|
1431 |
##################################################
|
1453 |
##################################################
|
Line 1838... |
Line 1860... |
1838 |
SysVStartPriority=99
|
1860 |
SysVStartPriority=99
|
1839 |
|
1861 |
|
1840 |
[Install]
|
1862 |
[Install]
|
1841 |
WantedBy=multi-user.target
|
1863 |
WantedBy=multi-user.target
|
1842 |
EOF
|
1864 |
EOF
|
1843 |
# processes launched at boot time (SYSV)
|
- |
|
1844 |
for i in tinyproxy
|
- |
|
1845 |
do
|
- |
|
1846 |
/sbin/chkconfig --add $i
|
- |
|
1847 |
done
|
- |
|
1848 |
# processes launched at boot time (Systemctl)
|
1865 |
# processes launched at boot time (Systemctl)
|
1849 |
for i in alcasar-load_balancing mysqld httpd ntpd iptables dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole radiusd nfsen dansguardian freshclam ulogd-ssh ulogd-traceability ulogd-ext-access chilli fail2ban havp
|
1866 |
for i in alcasar-load_balancing mysqld httpd ntpd iptables dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole radiusd nfsen dansguardian freshclam ulogd-ssh ulogd-traceability ulogd-ext-access chilli fail2ban havp tinyproxy
|
1850 |
do
|
1867 |
do
|
1851 |
systemctl -q enable $i.service
|
1868 |
systemctl -q enable $i.service
|
1852 |
done
|
1869 |
done
|
1853 |
|
1870 |
|
1854 |
# disable processes at boot time (Systemctl)
|
1871 |
# disable processes at boot time (Systemctl)
|