Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1851 2016-04-30 14:33:57Z franck $
|
2 |
# $Id: alcasar.sh 1852 2016-05-01 18:46:46Z raphael.pion $
|
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 1622... |
Line 1622... |
1622 |
# block all SSL and CONNECT tunnels specified only as an IP
|
1622 |
# block all SSL and CONNECT tunnels specified only as an IP
|
1623 |
*ips
|
1623 |
*ips
|
1624 |
# block all sites specified only by an IP
|
1624 |
# block all sites specified only by an IP
|
1625 |
*ip
|
1625 |
*ip
|
1626 |
EOF
|
1626 |
EOF
|
1627 |
# Add Bing and Youtube to the safesearch url regext list (parental control)
|
1627 |
# Add Bing to the safesearch url regext list (parental control)
|
1628 |
cat <<EOF >> $DIR_DG/lists/urlregexplist
|
1628 |
cat <<EOF >> $DIR_DG/lists/urlregexplist
|
1629 |
# Bing - add 'adlt=strict'
|
1629 |
# Bing - add 'adlt=strict'
|
1630 |
#"(^http://[0-9a-z]+\.bing\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&adlt=strict"
|
1630 |
#"(^http://[0-9a-z]+\.bing\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&adlt=strict"
|
1631 |
# Youtube - add 'edufilter=your_ID'
|
- |
|
1632 |
#"(^http://[0-9a-z]+\.youtube\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&edufilter=ABCD1234567890abcdef"
|
- |
|
1633 |
EOF
|
1631 |
EOF
|
1634 |
# change the the google safesearch ("safe=strict" instead of "safe=vss")
|
1632 |
# change the the google safesearch ("safe=strict" instead of "safe=vss")
|
1635 |
$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist
|
1633 |
$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist
|
1636 |
# adapt the BL to ALCASAR architecture. Enable the default categories
|
1634 |
# adapt the BL to ALCASAR architecture. Enable the default categories
|
1637 |
if [ "$mode" != "update" ]; then
|
1635 |
if [ "$mode" != "update" ]; then
|
Line 1830... |
Line 1828... |
1830 |
# Put the default values in conf file
|
1828 |
# Put the default values in conf file
|
1831 |
echo "SSH=on" >> $CONF_FILE
|
1829 |
echo "SSH=on" >> $CONF_FILE
|
1832 |
echo "SSH_ADMIN_FROM=0.0.0.0/0.0.0.0" >> $CONF_FILE
|
1830 |
echo "SSH_ADMIN_FROM=0.0.0.0/0.0.0.0" >> $CONF_FILE
|
1833 |
echo "LDAP=off" >> $CONF_FILE
|
1831 |
echo "LDAP=off" >> $CONF_FILE
|
1834 |
echo "LDAP_IP=0.0.0.0/0.0.0.0" >> $CONF_FILE
|
1832 |
echo "LDAP_IP=0.0.0.0/0.0.0.0" >> $CONF_FILE
|
1835 |
echo "YOUTUBE_ID=ABCD1234567890abcdef" >> $CONF_FILE
|
- |
|
1836 |
echo "MULTIWAN=off" >> $CONF_FILE
|
1833 |
echo "MULTIWAN=off" >> $CONF_FILE
|
1837 |
echo "FAILOVER=30" >> $CONF_FILE
|
1834 |
echo "FAILOVER=30" >> $CONF_FILE
|
1838 |
echo "## WANx=active,@IPx/mask,GWx,Weight,MTUx" >> $CONF_FILE
|
1835 |
echo "## WANx=active,@IPx/mask,GWx,Weight,MTUx" >> $CONF_FILE
|
1839 |
echo "#WAN1=\"1,$EXTIF:1,192.168.2.20/24,192.168.2.6,1,1500\"" >> $CONF_FILE
|
1836 |
echo "#WAN1=\"1,$EXTIF:1,192.168.2.20/24,192.168.2.6,1,1500\"" >> $CONF_FILE
|
1840 |
echo "#WAN2=\"1,$EXTIF:2,192.168.3.20/24,192.168.3.1,2,1500\"" >> $CONF_FILE
|
1837 |
echo "#WAN2=\"1,$EXTIF:2,192.168.3.20/24,192.168.3.1,2,1500\"" >> $CONF_FILE
|