Subversion Repositories ALCASAR

Rev

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

Rev 3206 Rev 3214
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 3206 2024-06-16 22:31:29Z rexy $
2
#  $Id: alcasar.sh 3214 2024-07-01 17:32:18Z 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, unbound, gammu, 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, unbound, gammu, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
6
# contact : info@alcasar.net
6
# contact : info@alcasar.net
7
 
7
 
Line 64... Line 64...
64
DOMAIN="localdomain"					# default local domain
64
DOMAIN="localdomain"					# default local domain
65
EXTIF=''								# EXTIF is connected to the ISP broadband modem/router (In France : Box-FAI)
65
EXTIF=''								# EXTIF is connected to the ISP broadband modem/router (In France : Box-FAI)
66
INTIF=''								# INTIF is connected to the consultation network
66
INTIF=''								# INTIF is connected to the consultation network
67
MTU="1500"
67
MTU="1500"
68
DEFAULT_PRIVATE_IP_MASK="192.168.182.1/24"	# Default ALCASAR IP address
68
DEFAULT_PRIVATE_IP_MASK="192.168.182.1/24"	# Default ALCASAR IP address
-
 
69
export LC_ALL=C.UTF-8 					# switch to default
69
# ****** Paths - chemin des commandes *******
70
# ****** Paths - chemin des commandes *******
70
SED="/bin/sed -i"
71
SED="/bin/sed -i"
71
# ****************** End of global parameters *********************
72
# ****************** End of global parameters *********************
72
 
73
 
73
license()
74
license()
Line 377... Line 378...
377
		echo "ONBOOT=yes"
378
		echo "ONBOOT=yes"
378
		exit 1
379
		exit 1
379
	fi
380
	fi
380
	echo -n "."
381
	echo -n "."
381
# Test if default GW is alive
382
# Test if default GW is alive
382
	arp_reply=`LANG=en_US.UTF8 /usr/sbin/arping -b -I$EXTIF -c1 -w2 $PUBLIC_GATEWAY|grep response|cut -d" " -f2`
383
	arp_reply=`/usr/sbin/arping -b -I$EXTIF -c1 -w2 $PUBLIC_GATEWAY|grep response|cut -d" " -f2`
383
	if [ "$(expr $arp_reply)" -eq 0 ]
384
	if [ "$(expr $arp_reply)" -eq 0 ]
384
		then
385
		then
385
		if [ $Lang == "fr" ]
386
		if [ $Lang == "fr" ]
386
		then
387
		then
387
			echo -e "\nÉchec"
388
			echo -e "\nÉchec"