Subversion Repositories ALCASAR

Rev

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

Rev 3040 Rev 3043
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 3040 2022-07-17 22:31:53Z rexy $
2
#  $Id: alcasar.sh 3043 2022-07-22 17:10:23Z rexy $
3
 
3
 
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, lighttpd, php, netfilter, e2guardian, ntpd, openssl, dnsmasq, unbound, gammu, clamav, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, lighttpd, php, netfilter, e2guardian, ntpd, openssl, dnsmasq, unbound, gammu, clamav, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
6
# contact : info@alcasar.net
6
# contact : info@alcasar.net
7
 
7
 
Line 113... Line 113...
113
## - Test Internet access                             ##
113
## - Test Internet access                             ##
114
########################################################
114
########################################################
115
system_testing()
115
system_testing()
116
{
116
{
117
# Test of Mageia version
117
# Test of Mageia version
118
# extract the current Mageia version and hardware architecture (i586 ou X64)
118
# extract the current Mageia version and hardware architecture (X86_64)
119
	fic=`cat /etc/product.id`
119
	fic=`cat /etc/product.id`
120
	unknown_os=0
120
	unknown_os=0
121
	old="$IFS"
121
	old="$IFS"
122
	IFS=","
122
	IFS=","
123
	set $fic
123
	set $fic
Line 2169... Line 2169...
2169
	$SED "s?^PermitRootLogin.*?PermitRootLogin without-password?g" /etc/ssh/sshd_config
2169
	$SED "s?^PermitRootLogin.*?PermitRootLogin without-password?g" /etc/ssh/sshd_config
2170
	$SED "s?^X11Forwarding.*?#X11Forwarding yes?g" /etc/ssh/sshd_config
2170
	$SED "s?^X11Forwarding.*?#X11Forwarding yes?g" /etc/ssh/sshd_config
2171
# ALCASAR conf file
2171
# ALCASAR conf file
2172
	echo "HTTPS_LOGIN=off" >> $CONF_FILE
2172
	echo "HTTPS_LOGIN=off" >> $CONF_FILE
2173
	echo "HTTPS_CHILLI=off" >> $CONF_FILE
2173
	echo "HTTPS_CHILLI=off" >> $CONF_FILE
2174
	echo "SSH=off" >> $CONF_FILE
2174
	echo "SSH_LAN=22" >> $CONF_FILE
2175
	echo "SSH_WAN=22" >> $CONF_FILE
2175
	echo "SSH_WAN=0" >> $CONF_FILE
2176
	echo "SSH_ADMIN_FROM=0.0.0.0/0.0.0.0" >> $CONF_FILE
2176
	echo "SSH_ADMIN_FROM=0.0.0.0/0.0.0.0" >> $CONF_FILE
2177
	echo "LDAP=off" >> $CONF_FILE
2177
	echo "LDAP=off" >> $CONF_FILE
2178
	echo "LDAP_SERVER=127.0.0.1" >> $CONF_FILE
2178
	echo "LDAP_SERVER=127.0.0.1" >> $CONF_FILE
2179
	echo "LDAP_BASE=cn=Users;dc=serverad;dc=localdomain" >> $CONF_FILE
2179
	echo "LDAP_BASE=cn=Users;dc=serverad;dc=localdomain" >> $CONF_FILE
2180
	echo "LDAP_UID=sAMAccountName" >> $CONF_FILE
2180
	echo "LDAP_UID=sAMAccountName" >> $CONF_FILE