Subversion Repositories ALCASAR

Rev

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

Rev 2757 Rev 2758
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2757 2019-10-31 17:59:21Z rexy $
2
#  $Id: alcasar.sh 2758 2019-11-03 23:17:20Z 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 877... Line 877...
877
	[ -d /var/log/lighttpd ] || mkdir /var/log/lighttpd
877
	[ -d /var/log/lighttpd ] || mkdir /var/log/lighttpd
878
	[ -e /var/log/lighttpd/access.log ] || touch /var/log/lighttpd/access.log
878
	[ -e /var/log/lighttpd/access.log ] || touch /var/log/lighttpd/access.log
879
	[ -e /var/log/lighttpd/error.log ] || touch /var/log/lighttpd/error.log
879
	[ -e /var/log/lighttpd/error.log ] || touch /var/log/lighttpd/error.log
880
 
880
 
881
	chown -R apache:apache /var/log/lighttpd
881
	chown -R apache:apache /var/log/lighttpd
882
	/usr/bin/systemctl start lighttpd
882
#	/usr/bin/systemctl start lighttpd
883
	/usr/bin/systemctl start php-fpm
883
#	/usr/bin/systemctl start php-fpm
884
 
884
 
885
# Creation of the first account (in 'admin' profile)
885
# Creation of the first account (in 'admin' profile)
886
	if [ "$mode" = "install" ]
886
	if [ "$mode" = "install" ]
887
	then
887
	then
888
		header_install
888
		header_install
Line 1034... Line 1034...
1034
	secret = $secretradius
1034
	secret = $secretradius
1035
	shortname = chilli
1035
	shortname = chilli
1036
	nas_type = other
1036
	nas_type = other
1037
}
1037
}
1038
EOF
1038
EOF
-
 
1039
# Set Virtual server
1039
# Set Virtual server (remvove all except "alcasar virtual site")
1040
    # Remvoveing all except "alcasar virtual site")
1040
	rm -f /etc/raddb/sites-enabled/*
1041
	# INFO : To enable 802.1X, add the "innser-tunnel" virtual server (link in sites-enabled)  Change the firewall rules to allow "radius" extern connections.
1041
	cp $DIR_CONF/radius/alcasar /etc/raddb/sites-available/alcasar
1042
	cp $DIR_CONF/radius/alcasar /etc/raddb/sites-available/alcasar
1042
	cp $DIR_CONF/radius/alcasar-with-ldap /etc/raddb/sites-available/alcasar-with-ldap
1043
	cp $DIR_CONF/radius/alcasar-with-ldap /etc/raddb/sites-available/alcasar-with-ldap
1043
	chown radius:apache /etc/raddb/sites-available/alcasar*
1044
	chown radius:apache /etc/raddb/sites-available/alcasar*
1044
	chmod 660 /etc/raddb/sites-available/alcasar*
1045
	chmod 660 /etc/raddb/sites-available/alcasar*
-
 
1046
	rm -f /etc/raddb/sites-enabled/*
1045
	ln -s /etc/raddb/sites-available/alcasar /etc/raddb/sites-enabled/alcasar
1047
	ln -s /etc/raddb/sites-available/alcasar /etc/raddb/sites-enabled/alcasar
1046
	# INFO : To connect from outside (EAP), add the EAP virtual server (link in sites-enabled) and inner-tunnel modules (link in mods-enabled)
-
 
1047
# Set modules
1048
# Set modules
1048
	# Add custom LDAP "available module"
1049
	# Add custom LDAP "available module"
-
 
1050
	# INFO : To enable 802.1X, add the "eap" module and verify access to the keys (/etc/pki/tls/private/radius.pem). Change the firewall rules to allow "radius" extern connections.
1049
	cp -f $DIR_CONF/radius/ldap-alcasar /etc/raddb/mods-available/
1051
	cp -f $DIR_CONF/radius/ldap-alcasar /etc/raddb/mods-available/
1050
	chown -R radius:radius /etc/raddb/mods-available/ldap-alcasar
1052
	chown -R radius:radius /etc/raddb/mods-available/ldap-alcasar
1051
	# Set only usefull modules for ALCASAR (! the module 'ldap-alcasar' is enabled only via ACC)
1053
	# Set only usefull modules for ALCASAR (! the module 'ldap-alcasar' is enabled only via ACC)
1052
	rm -rf  /etc/raddb/mods-enabled/*
1054
	rm -rf  /etc/raddb/mods-enabled/*
1053
	for mods in sql sqlcounter attr_filter expiration logintime pap expr always
1055
	for mods in sql sqlcounter attr_filter expiration logintime pap expr always
1054
	do
1056
	do
1055
		ln -s /etc/raddb/mods-available/$mods /etc/raddb/mods-enabled/$mods
1057
		ln -s /etc/raddb/mods-available/$mods /etc/raddb/mods-enabled/$mods
1056
	done
1058
	done
1057
	# INFO : To connect from outside (EAP), add the EAP module (and right accesses to the keys (/etc/pki/tls/private/radius.pem)
-
 
1058
# Configure SQL mod
1059
# Configure SQL module
1059
	[ -e /etc/raddb/mods-available/sql.default ] || cp /etc/raddb/mods-available/sql /etc/raddb/mods-available/sql.default
1060
	[ -e /etc/raddb/mods-available/sql.default ] || cp /etc/raddb/mods-available/sql /etc/raddb/mods-available/sql.default
1060
	$SED "s?^[\t ]*driver =.*?driver = \"rlm_sql_mysql\"?g" /etc/raddb/mods-available/sql
1061
	$SED "s?^[\t ]*driver =.*?driver = \"rlm_sql_mysql\"?g" /etc/raddb/mods-available/sql
1061
	$SED "s?^[\t ]*dialect =.*?dialect = \"mysql\"?g" /etc/raddb/mods-available/sql
1062
	$SED "s?^[\t ]*dialect =.*?dialect = \"mysql\"?g" /etc/raddb/mods-available/sql
1062
	$SED "s?^[\t ]*radius_db =.*?radius_db = \"$DB_RADIUS\"?g" /etc/raddb/mods-available/sql
1063
	$SED "s?^[\t ]*radius_db =.*?radius_db = \"$DB_RADIUS\"?g" /etc/raddb/mods-available/sql
1063
	$SED "s?^#[\t ]*server =.*?server = \"localhost\"?g" /etc/raddb/mods-available/sql
1064
	$SED "s?^#[\t ]*server =.*?server = \"localhost\"?g" /etc/raddb/mods-available/sql
1064
	$SED "s?^#[\t ]*port =.*?port = \"3306\"?g" /etc/raddb/mods-available/sql
1065
	$SED "s?^#[\t ]*port =.*?port = \"3306\"?g" /etc/raddb/mods-available/sql
1065
	$SED "s?^#[\t ]*login =.*?login = \"$DB_USER\"?g" /etc/raddb/mods-available/sql
1066
	$SED "s?^#[\t ]*login =.*?login = \"$DB_USER\"?g" /etc/raddb/mods-available/sql
1066
	$SED "s?^#[\t ]*password =.*?password = \"$radiuspwd\"?g" /etc/raddb/mods-available/sql
1067
	$SED "s?^#[\t ]*password =.*?password = \"$radiuspwd\"?g" /etc/raddb/mods-available/sql
-
 
1068
	# no TLS encryption on 127.0.0.1
-
 
1069
	$SED "s?^[\t] ]*ca_file =.*?#&?g" /etc/raddb/mods-available/sql
-
 
1070
	$SED "s?^[\t] ]*ca_path =.*?#&?g" /etc/raddb/mods-available/sql
-
 
1071
	$SED "s?^[\t] ]*certificate_file =.*?#&?g" /etc/raddb/mods-available/sql
-
 
1072
	$SED "s?^[\t] ]*private_key_file =.*?#&?g" /etc/raddb/mods-available/sql
-
 
1073
	$SED "s?^[\t] ]*cipher =.*?#&?g" /etc/raddb/mods-available/sql
-
 
1074
	$SED "s?^[\t] ]*tls_required =.*?tls_required = no?g" /etc/raddb/mods-available/sql
1067
# queries.conf modifications : case sensitive for username, check simultaneous use, patch on 'postauth' table, etc.
1075
# queries.conf modifications : case sensitive for username, check simultaneous use, patch on 'postauth' table, etc.
1068
	[ -e /etc/raddb/mods-config/sql/main/mysql/queries.conf.default ] || cp /etc/raddb/mods-config/sql/main/mysql/queries.conf /etc/raddb/mods-config/sql/main/mysql/queries.conf.default
1076
	[ -e /etc/raddb/mods-config/sql/main/mysql/queries.conf.default ] || cp /etc/raddb/mods-config/sql/main/mysql/queries.conf /etc/raddb/mods-config/sql/main/mysql/queries.conf.default
1069
	cp -f $DIR_CONF/radius/queries.conf /etc/raddb/mods-config/sql/main/mysql/queries.conf
1077
	cp -f $DIR_CONF/radius/queries.conf /etc/raddb/mods-config/sql/main/mysql/queries.conf
1070
	chown -R radius:radius /etc/raddb/mods-config/sql/main/mysql/queries.conf
1078
	chown -R radius:radius /etc/raddb/mods-config/sql/main/mysql/queries.conf
1071
# sqlcounter modifications
1079
# sqlcounter modifications
Line 1284... Line 1292...
1284
################################################################
1292
################################################################
1285
e2guardian()
1293
e2guardian()
1286
{
1294
{
1287
	mkdir -p /var/e2guardian /var/log/e2guardian
1295
	mkdir -p /var/e2guardian /var/log/e2guardian
1288
	chown -R e2guardian /var/e2guardian /var/log/e2guardian
1296
	chown -R e2guardian /var/e2guardian /var/log/e2guardian
-
 
1297
# Adapt systemd unit
-
 
1298
[ -e /lib/systemd/system/e2guardian.service.default ] || cp /lib/systemd/system/e2guardian.service /lib/systemd/system/e2guardian.service.default
1289
	$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/e2guardian -c /etc/e2guardian/e2guardian.conf?g" /lib/systemd/system/e2guardian.service
1299
	$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/e2guardian -c /etc/e2guardian/e2guardian.conf?g" /lib/systemd/system/e2guardian.service
1290
	$SED "s?^After=.*?After=network.target chilli.service?g" /lib/systemd/system/e2guardian.service
1300
	$SED "s?^After=.*?After=network.target chilli.service?g" /lib/systemd/system/e2guardian.service
1291
	[ -e $DIR_DG/e2guardian.conf.default ] || cp $DIR_DG/e2guardian.conf $DIR_DG/e2guardian.conf.default
1301
	[ -e $DIR_DG/e2guardian.conf.default ] || cp $DIR_DG/e2guardian.conf $DIR_DG/e2guardian.conf.default
-
 
1302
 
1292
# By default the filter is off
1303
# Adapt the main conf file
1293
	$SED "s/^reportinglevel =.*/reportinglevel = 3/g" $DIR_DG/e2guardian.conf
-
 
1294
# French deny HTML page
1304
# French deny HTML page
1295
	$SED "s?^language =.*?language = french?g" $DIR_DG/e2guardian.conf
1305
	$SED "s?^language =.*?language = french?g" $DIR_DG/e2guardian.conf
1296
# Listen only on LAN side
1306
# Listen only on LAN side
1297
	$SED "s?^filterip.*?filterip = $PRIVATE_IP?g" $DIR_DG/e2guardian.conf
1307
	$SED "s?^filterip.*?filterip = $PRIVATE_IP?g" $DIR_DG/e2guardian.conf
1298
# DG send its flow to HAVP
1308
# The port that E2guardian listens to
1299
	$SED "s?^proxyport.*?proxyport = 8090?g" $DIR_DG/e2guardian.conf
1309
	$SED "s?^filterports =*?filteports = 8080?g" $DIR_DG/e2guardian.conf
1300
# replace the default deny HTML page
1310
# DG send its flow to HAVP (127.0.0.1:8090)
1301
	cp -f $DIR_CONF/template.html /usr/share/e2guardian/languages/ukenglish/
1311
	$SED "s?^#proxyip.*?proxyip = 127.0.0.1?g" $DIR_DG/e2guardian.conf
1302
	cp -f $DIR_CONF/template-fr.html /usr/share/e2guardian/languages/french/template.html
1312
	$SED "s?^#proxyport.*?proxyport = 8090?g" $DIR_DG/e2guardian.conf
1303
# Don't log
1313
# Don't log
1304
	$SED "s?^loglevel =.*?loglevel = 0?g" $DIR_DG/e2guardian.conf
1314
	$SED "s?^loglevel =.*?loglevel = 0?g" $DIR_DG/e2guardian.conf
1305
# # Change the default report page
-
 
1306
	$SED "s?^accessdeniedaddress =.*?accessdeniedaddress = http://$HOSTNAME.$DOMAIN?g" $DIR_DG/e2guardian.conf
-
 
1307
# Disable HTML content control
1315
# Disable HTML content control
1308
	$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/e2guardian.conf
1316
	$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/e2guardian.conf
1309
	cp $DIR_DG/lists/bannedphraselist $DIR_DG/lists/bannedphraselist.default
1317
	cp $DIR_DG/lists/bannedphraselist $DIR_DG/lists/bannedphraselist.default
1310
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedphraselist # (on commente ce qui ne l'est pas)
1318
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedphraselist # (comment what is not)
1311
# Disable URL control with regex
1319
# Disable URL control with regex
1312
	cp $DIR_DG/lists/bannedregexpurllist $DIR_DG/lists/bannedregexpurllist.default
1320
	cp $DIR_DG/lists/bannedregexpurllist $DIR_DG/lists/bannedregexpurllist.default
1313
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedregexpurllist # (on commente ce qui ne l'est pas)
1321
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedregexpurllist # (comment what is not)
1314
# Configure E2guardian for large site
-
 
1315
# Minimum number of processus to handle connections
-
 
1316
	$SED "s?^minchildren =.*?minchildren = 15?g" $DIR_DG/e2guardian.conf
-
 
1317
# Maximum number of processus to handle connections
-
 
1318
	$SED "s?^maxchildren =.*?maxchildren = 200?g" $DIR_DG/e2guardian.conf
-
 
1319
# Run at least 8 daemons
-
 
1320
	$SED "s?^minsparechildren =.*?minsparechildren = 8?g" $DIR_DG/e2guardian.conf
-
 
1321
# minimum number of processes to spawn
-
 
1322
	$SED "s?^preforkchildren =.*?preforkchildren = 10?g" $DIR_DG/e2guardian.conf
-
 
-
 
1322
 
1323
# maximum age of a child process before it croaks it
1323
# Adapt the first group file (only one for instance)
1324
	$SED "s?^maxagechildren =.*?maxagechildren = 1000?g" $DIR_DG/e2guardian.conf
-
 
1325
# Disable download files control
-
 
1326
	[ -e $DIR_DG/e2guardianf1.conf.default ] || cp $DIR_DG/e2guardianf1.conf $DIR_DG/e2guardianf1.conf.default
1324
	[ -e $DIR_DG/e2guardianf1.conf.default ] || cp $DIR_DG/e2guardianf1.conf $DIR_DG/e2guardianf1.conf.default
-
 
1325
# Reporting (deny page) in HTML
1327
	$SED "s?^blockdownloads =.*?blockdownloads = off?g" $DIR_DG/e2guardianf1.conf
1326
	$SED "s/^reportinglevel =.*/reportinglevel = 3/g" $DIR_DG/e2guardianf1.conf
-
 
1327
 
-
 
1328
# Replace the default deny HTML page (only fr & uk)
-
 
1329
	[ -e /usr/share/e2guardian/languages/french/template.html.default ] || mv /usr/share/e2guardian/languages/french/template.html /usr/share/e2guardian/languages/french/template.html.default
-
 
1330
	[ -e /usr/share/e2guardian/languages/ukenglish/template.html.default ] || mv /usr/share/e2guardian/languages/ukenglish/template.html /usr/share/e2guardian/languages/french/template.html.default
-
 
1331
	cp -f $DIR_CONF/template.html /usr/share/e2guardian/languages/ukenglish/template.html
-
 
1332
	cp -f $DIR_CONF/template-fr.html /usr/share/e2guardian/languages/french/template.html
-
 
1333
# Dont filtering files by extension or mime-type (empty list)
1328
	[ -e $DIR_DG/lists/bannedextensionlist.default ] || mv $DIR_DG/lists/bannedextensionlist $DIR_DG/lists/bannedextensionlist.default
1334
	[ -e $DIR_DG/lists/bannedextensionlist.default ] || mv $DIR_DG/lists/bannedextensionlist $DIR_DG/lists/bannedextensionlist.default
1329
	[ -e $DIR_DG/lists/bannedmimetypelist.default ] || mv $DIR_DG/lists/bannedmimetypelist $DIR_DG/lists/bannedmimetypelist.default
1335
	[ -e $DIR_DG/lists/bannedmimetypelist.default ] || mv $DIR_DG/lists/bannedmimetypelist $DIR_DG/lists/bannedmimetypelist.default
1330
	touch $DIR_DG/lists/bannedextensionlist
1336
	touch $DIR_DG/lists/bannedextensionlist
1331
	touch $DIR_DG/lists/bannedmimetypelist
1337
	touch $DIR_DG/lists/bannedmimetypelist
1332
# 'Safesearch' regex actualisation
-
 
1333
	$SED "s?images?search?g" $DIR_DG/lists/urlregexplist
-
 
1334
# empty LAN IP list that won't be WEB filtered
1338
# Empty LAN IP list that won't be WEB filtered
1335
	[ -e $DIR_DG/lists/exceptioniplist.default ] || mv $DIR_DG/lists/exceptioniplist $DIR_DG/lists/exceptioniplist.default
1339
	[ -e $DIR_DG/lists/exceptioniplist.default ] || mv $DIR_DG/lists/exceptioniplist $DIR_DG/lists/exceptioniplist.default
1336
	touch $DIR_DG/lists/exceptioniplist
1340
	touch $DIR_DG/lists/exceptioniplist
1337
# Keep a copy of URL & domain filter configuration files
1341
# Creation of ALCASAR banned site list
1338
	[ -e $DIR_DG/lists/bannedsitelist.default ] || mv $DIR_DG/lists/bannedsitelist $DIR_DG/lists/bannedsitelist.default
1342
	[ -e $DIR_DG/lists/bannedsitelist.default ] || mv $DIR_DG/lists/bannedsitelist $DIR_DG/lists/bannedsitelist.default
-
 
1343
	cat <<EOF > $DIR_DG/lists/bannedsitelist
-
 
1344
# E2guardian domain filter config for ALCASAR
-
 
1345
# block all sites except those in the exceptionsitelist --> liste blanche (désactivée)
-
 
1346
#**
-
 
1347
# block all SSL and CONNECT tunnels
-
 
1348
**s
-
 
1349
# block all SSL and CONNECT tunnels specified only as an IP
-
 
1350
*ips
-
 
1351
# block all sites specified only by an IP
-
 
1352
*ip
-
 
1353
EOF
-
 
1354
# Creation of ALCASAR banned URL list (empty)
1339
	[ -e $DIR_DG/lists/bannedurllist.default ] || mv $DIR_DG/lists/bannedurllist $DIR_DG/lists/bannedurllist.default
1355
	[ -e $DIR_DG/lists/bannedurllist.default ] || mv $DIR_DG/lists/bannedurllist $DIR_DG/lists/bannedurllist.default
-
 
1356
	cat <<EOF > $DIR_DG/lists/bannedurllist
-
 
1357
# E2guardian filter config for ALCASAR
-
 
1358
EOF
-
 
1359
# Creation of file for the rehabilited domains and urls
-
 
1360
	[ -e $DIR_DG/lists/exceptionsitelist.default ] || mv $DIR_DG/lists/exceptionsitelist $DIR_DG/lists/exceptionsitelist.default
-
 
1361
	[ -e $DIR_DG/lists/exceptionurllist.default ] || mv $DIR_DG/lists/exceptionurllist $DIR_DG/lists/exceptionurllist.default
-
 
1362
	touch $DIR_DG/lists/exceptionsitelist
-
 
1363
	touch $DIR_DG/lists/exceptionurllist
-
 
1364
# Add Bing to the safesearch url regext list (parental control)
-
 
1365
	[ -e $DIR_DG/lists/urlregexplist.default ] || mv $DIR_DG/lists/urlregexplist $DIR_DG/lists/urlregexplist.default
-
 
1366
	cat <<EOF >> $DIR_DG/lists/urlregexplist
-
 
1367
# Bing - add 'adlt=strict'
-
 
1368
#"(^http://[0-9a-z]+\.bing\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&adlt=strict"
-
 
1369
EOF
-
 
1370
# 'Safesearch' regex actualisation
-
 
1371
	$SED "s?images?search?g" $DIR_DG/lists/urlregexplist
-
 
1372
# change the google safesearch ("safe=strict" instead of "safe=vss")
-
 
1373
	$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist
1340
} # End of e2guardian()
1374
} # End of e2guardian()
1341
 
1375
 
1342
##################################################################
1376
##################################################################
1343
##                     Function "antivirus"                     ##
1377
##                     Function "antivirus"                     ##
1344
## - Set the parameters of havp, libclamav and freshclam        ##
1378
## - Set the parameters of havp, libclamav and freshclam        ##
Line 1823... Line 1857...
1823
{
1857
{
1824
	# copy the Toulouse university BL in order to be adapted to ALCASAR architecture (alcasar-bl.sh -adapt)
1858
	# copy the Toulouse university BL in order to be adapted to ALCASAR architecture (alcasar-bl.sh -adapt)
1825
	rm -rf $DIR_DG/lists/blacklists
1859
	rm -rf $DIR_DG/lists/blacklists
1826
	mkdir -p /tmp/blacklists
1860
	mkdir -p /tmp/blacklists
1827
	cp $DIR_BLACKLIST/blacklists.tar.gz /tmp/blacklists/
1861
	cp $DIR_BLACKLIST/blacklists.tar.gz /tmp/blacklists/
1828
# creation of file for the rehabilited domains and urls
-
 
1829
	[ -e $DIR_DG/lists/exceptionsitelist.default ] || mv $DIR_DG/lists/exceptionsitelist $DIR_DG/lists/exceptionsitelist.default
-
 
1830
	[ -e $DIR_DG/lists/exceptionurllist.default ] || mv $DIR_DG/lists/exceptionurllist $DIR_DG/lists/exceptionurllist.default
-
 
1831
	touch $DIR_DG/lists/exceptionsitelist
-
 
1832
	touch $DIR_DG/lists/exceptionurllist
-
 
1833
# On crée la configuration de base du filtrage de domaine et d'URL pour E2guardian
-
 
1834
	cat <<EOF > $DIR_DG/lists/bannedurllist
-
 
1835
# E2guardian filter config for ALCASAR
-
 
1836
EOF
-
 
1837
	cat <<EOF > $DIR_DG/lists/bannedsitelist
-
 
1838
# E2guardian domain filter config for ALCASAR
-
 
1839
# block all sites except those in the exceptionsitelist --> liste blanche (désactivée)
-
 
1840
#**
-
 
1841
# block all SSL and CONNECT tunnels
-
 
1842
**s
-
 
1843
# block all SSL and CONNECT tunnels specified only as an IP
-
 
1844
*ips
-
 
1845
# block all sites specified only by an IP
-
 
1846
*ip
-
 
1847
EOF
-
 
1848
# Add Bing to the safesearch url regext list (parental control)
-
 
1849
	cat <<EOF >> $DIR_DG/lists/urlregexplist
-
 
1850
# Bing - add 'adlt=strict'
-
 
1851
#"(^http://[0-9a-z]+\.bing\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&adlt=strict"
-
 
1852
EOF
-
 
1853
# change the google safesearch ("safe=strict" instead of "safe=vss")
-
 
1854
	$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist
-
 
1855
# creation of the custom BL and WL categorie named "ossi" (for domain names & ip only)
1862
# creation of the custom BL and WL categorie named "ossi" (for domain names & ip only)
1856
	mkdir -p $DIR_DG/lists/blacklists/ossi-bl
1863
	mkdir -p $DIR_DG/lists/blacklists/ossi-bl
1857
	touch $DIR_DG/lists/blacklists/ossi-bl/domains
1864
	touch $DIR_DG/lists/blacklists/ossi-bl/domains
1858
	echo "ossi-bl" >> $DIR_DEST_ETC/alcasar-bl-categories-enabled
1865
	echo "ossi-bl" >> $DIR_DEST_ETC/alcasar-bl-categories-enabled
1859
	mkdir -p $DIR_DG/lists/blacklists/ossi-wl
1866
	mkdir -p $DIR_DG/lists/blacklists/ossi-wl
Line 2469... Line 2476...
2469
			MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
2476
			MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
2470
			MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
2477
			MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
2471
			UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1`
2478
			UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1`
2472
			mode="update"
2479
			mode="update"
2473
		fi
2480
		fi
2474
		for func in init network ACC CA time_server init_db freeradius chilli e2guardian antivirus tinyproxy ulogd nfsen vnstat dnsmasq unbound dhcpd BL cron fail2ban gammu_smsd msec letsencrypt post_install
2481
		for func in init network CA ACC time_server init_db freeradius chilli e2guardian antivirus tinyproxy ulogd nfsen vnstat dnsmasq unbound dhcpd BL cron fail2ban gammu_smsd msec letsencrypt post_install
2475
		do
2482
		do
2476
			$func
2483
			$func
2477
			if [ $DEBUG_ALCASAR == "on" ]
2484
			if [ $DEBUG_ALCASAR == "on" ]
2478
			then
2485
			then
2479
				echo "*** 'debug' : end of install '$func' ***"
2486
				echo "*** 'debug' : end of install '$func' ***"