Subversion Repositories ALCASAR

Rev

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

Rev 1864 Rev 1867
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1864 2016-05-03 12:45:00Z raphael.pion $ 
2
#  $Id: alcasar.sh 1867 2016-05-04 12:22:08Z 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 1553... Line 1553...
1553
domain=$DOMAIN
1553
domain=$DOMAIN
1554
domain-needed
1554
domain-needed
1555
expand-hosts
1555
expand-hosts
1556
bogus-priv
1556
bogus-priv
1557
filterwin2k
1557
filterwin2k
1558
ipset=/#/whitelist_ip_allowed			# dynamicly add the resolv IP address in the Firewall rules
1558
ipset=/#/wl_ip_allowed			# dynamicly add the resolv IP address in the Firewall rules
1559
address=/#/$PRIVATE_IP				# for Domain name without local resolution (WL)  
1559
address=/#/$PRIVATE_IP				# for Domain name without local resolution (WL)  
1560
EOF
1560
EOF
1561
# 4th dnsmasq listen on udp 56 ("blackhole")
1561
# 4th dnsmasq listen on udp 56 ("blackhole")
1562
	cat << EOF > /etc/dnsmasq-blackhole.conf 
1562
	cat << EOF > /etc/dnsmasq-blackhole.conf 
1563
# Configuration file for "dnsmasq as a blackhole"
1563
# Configuration file for "dnsmasq as a blackhole"
Line 1706... Line 1706...
1706
# activation du "chien de garde" (daemon-watchdog) toutes les 18'
1706
# activation du "chien de garde" (daemon-watchdog) toutes les 18'
1707
*/18 * * * * root $DIR_DEST_BIN/alcasar-daemon.sh > /dev/null 2>&1
1707
*/18 * * * * root $DIR_DEST_BIN/alcasar-daemon.sh > /dev/null 2>&1
1708
EOF
1708
EOF
1709
 
1709
 
1710
 
1710
 
-
 
1711
# Enabling update for BL/WL categories with rsync
-
 
1712
	cat << EOF > /etc/cron.d/alcasar-update-cat
-
 
1713
# update malware category every twelve hours
-
 
1714
* 0-23/12 * * * /usr/local/bin/alcasar-bl.sh --update-cat malware rsync://ftp.ut-capitole.fr/blacklist/dest/malware > /dev/null 2>&1
-
 
1715
EOF
-
 
1716
 
-
 
1717
chown root:apache /etc/cron.d/alcasar-update-cat
-
 
1718
 
1711
# removing the users crons
1719
# removing the users crons
1712
	rm -f /var/spool/cron/*
1720
	rm -f /var/spool/cron/*
1713
} # End cron
1721
} # End cron
1714
 
1722
 
1715
##################################################################
1723
##################################################################