Subversion Repositories ALCASAR

Rev

Rev 2842 | Rev 2847 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2842 Rev 2844
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2842 2020-06-30 22:06:56Z rexy $
2
#  $Id: alcasar.sh 2844 2020-07-04 15:21:55Z rexy $
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
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
#  team@alcasar.net
7
#  team@alcasar.net
Line 1276... Line 1276...
1276
	$SED "s?^filterip =.*?filterip = $PRIVATE_IP?g" $DIR_DG/e2guardian.conf
1276
	$SED "s?^filterip =.*?filterip = $PRIVATE_IP?g" $DIR_DG/e2guardian.conf
1277
	$SED "s?^filterports =.*?filterports = 8080?g" $DIR_DG/e2guardian.conf
1277
	$SED "s?^filterports =.*?filterports = 8080?g" $DIR_DG/e2guardian.conf
1278
# Listen on 8090 (HTTP for WL/AV users) only on LAN side
1278
# Listen on 8090 (HTTP for WL/AV users) only on LAN side
1279
	$SED "/^filterip = $PRIVATE_IP/a filterip = $PRIVATE_IP" $DIR_DG/e2guardian.conf
1279
	$SED "/^filterip = $PRIVATE_IP/a filterip = $PRIVATE_IP" $DIR_DG/e2guardian.conf
1280
	$SED "/^filterports = 8080/a filterports = 8090" $DIR_DG/e2guardian.conf
1280
	$SED "/^filterports = 8080/a filterports = 8090" $DIR_DG/e2guardian.conf
1281
# E2guardian listens transparently on 8443 (HTTPS)
1281
# E2guardian doesn't listen transparently on 8443 (HTTPS) (only in future version)
1282
	$SED "s?^transparenthttpsport =.*?transparenthttpsport = 8443?g" $DIR_DG/e2guardian.conf
1282
	$SED "s?^transparenthttpsport =.*?#transparenthttpsport = 8443?g" $DIR_DG/e2guardian.conf
1283
# Don't log
1283
# Don't log
1284
	$SED "s?^loglevel =.*?loglevel = 0?g" $DIR_DG/e2guardian.conf
1284
	$SED "s?^loglevel =.*?loglevel = 0?g" $DIR_DG/e2guardian.conf
1285
# Disable HTML content control (weighted & banned)
1285
# Disable HTML content control (weighted & banned)
1286
	$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/e2guardian.conf
1286
	$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/e2guardian.conf
1287
# Enable authport plugin
1287
# Enable authport plugin
Line 1468... Line 1468...
1468
    [ -e /etc/vnstat.conf.default ] || cp /etc/vnstat.conf /etc/vnstat.conf.default
1468
    [ -e /etc/vnstat.conf.default ] || cp /etc/vnstat.conf /etc/vnstat.conf.default
1469
	$SED "s?^Interface.*?Interface \"$EXTIF\"?g" /etc/vnstat.conf
1469
	$SED "s?^Interface.*?Interface \"$EXTIF\"?g" /etc/vnstat.conf
1470
	$SED "s?^DatabaseDir.*?DatabaseDir /var/log/vnstat?g" /etc/vnstat.conf
1470
	$SED "s?^DatabaseDir.*?DatabaseDir /var/log/vnstat?g" /etc/vnstat.conf
1471
    # vnstat-dashboard
1471
    # vnstat-dashboard
1472
    $SED "s?^\$thisInterface.*?\$thisInterface = \"$EXTIF\";?" $DIR_ACC/manager/vnstat/index.php
1472
    $SED "s?^\$thisInterface.*?\$thisInterface = \"$EXTIF\";?" $DIR_ACC/manager/vnstat/index.php
-
 
1473
	[ -e /lib/systemd/system/vnstat.service.default ] || cp /lib/systemd/system/vnstat.service /lib/systemd/system/vnstat.service.default
-
 
1474
    $SED "s?^PIDFILE=.*?PIDFILE=/var/run/vnstat/vnstat.pid?g" /lib/systemd/system/vnstat.service
1473
} # End of vnstat()
1475
} # End of vnstat()
1474
 
1476
 
1475
###################################################################
1477
###################################################################
1476
##                     Function "dnsmasq"                        ##
1478
##                     Function "dnsmasq"                        ##
1477
## - creation of the conf files of dnsmasq (whitelist for ipset )##
1479
## - creation of the conf files of dnsmasq (whitelist for ipset )##