Subversion Repositories ALCASAR

Rev

Rev 3281 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3281 Rev 3283
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 3281 2025-05-14 21:50:06Z rexy $
2
# $Id: alcasar-conf.sh 3283 2025-05-18 21:06:00Z rexy $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.sh
5
# by REXY
5
# by 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
 
7
 
Line 356... Line 356...
356
		$SED "s/^    ServerName.*/    ServerName $HOSTNAME.$DOMAIN/g" /etc/httpd/conf/vhosts.d/00_default_vhosts.conf /etc/httpd/conf/vhosts.d/00_default_ssl_vhost.conf
356
		$SED "s/^    ServerName.*/    ServerName $HOSTNAME.$DOMAIN/g" /etc/httpd/conf/vhosts.d/00_default_vhosts.conf /etc/httpd/conf/vhosts.d/00_default_ssl_vhost.conf
357
		$SED "s?^Listen.*?Listen $PRIVATE_IP:80?g" /etc/httpd/conf/httpd.conf
357
		$SED "s?^Listen.*?Listen $PRIVATE_IP:80?g" /etc/httpd/conf/httpd.conf
358
		FIC_MOD_SSL=`find /etc/httpd/conf/ -type f -name ssl.conf`
358
		FIC_MOD_SSL=`find /etc/httpd/conf/ -type f -name ssl.conf`
359
		$SED "s?^Listen.*?Listen $PRIVATE_IP:443?g" $FIC_MOD_SSL
359
		$SED "s?^Listen.*?Listen $PRIVATE_IP:443?g" $FIC_MOD_SSL
360
		$SED "/127.0.0.1/!s?Allow from .*?Allow from $PRIVATE_NETWORK_MASK?g" /etc/httpd/conf/webapps.d/alcasar.conf
360
		$SED "/127.0.0.1/!s?Allow from .*?Allow from $PRIVATE_NETWORK_MASK?g" /etc/httpd/conf/webapps.d/alcasar.conf
-
 
361
		$SED "/Allow from/d"  /etc/httpd/conf/webapps.d/alcasar.conf
-
 
362
		if [ $(grep -c "^managerIPs=" $DIR_ETC/alcasar-iptables-local.sh) -eq 1 ] ;then
-
 
363
			grep "^managerIPs=" $DIR_ETC/alcasar-iptables-local.sh | cut -d "'" -f2 | sed "s/,/\n/g" | while read -r managerIP
-
 
364
			do
-
 
365
	    			$SED "/Deny from all/a\ \tAllow from $managerIP" /etc/httpd/conf/webapps.d/alcasar.conf
-
 
366
			done
-
 
367
		fi
-
 
368
		$SED "/Deny from all/a\ \tAllow from 127.0.0.1\n\tAllow from $PRIVATE_NETWORK_MASK" /etc/httpd/conf/webapps.d/alcasar.conf
361
# FreeRADIUS
369
# FreeRADIUS
362
		$SED "s?^nas1_name:.*?nas1_name: alcasar-$ORGANISME?g" /etc/freeradius-web/naslist.conf
370
		$SED "s?^nas1_name:.*?nas1_name: alcasar-$ORGANISME?g" /etc/freeradius-web/naslist.conf
363
		$SED "s?^nas1_ip:.*?nas1_ip: $PRIVATE_IP?g" /etc/freeradius-web/naslist.conf
371
		$SED "s?^nas1_ip:.*?nas1_ip: $PRIVATE_IP?g" /etc/freeradius-web/naslist.conf
364
# CoovaChilli
372
# CoovaChilli
365
		$SED "s/^uamallowed.*/uamallowed\t$HOSTNAME,$HOSTNAME.$DOMAIN/g" /etc/chilli.conf
373
		$SED "s/^uamallowed.*/uamallowed\t$HOSTNAME,$HOSTNAME.$DOMAIN/g" /etc/chilli.conf