Subversion Repositories ALCASAR

Rev

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

Rev 2234 Rev 2249
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $Id: alcasar-conup.sh 2234 2017-05-18 21:20:10Z richard $
3
# $Id: alcasar-conup.sh 2249 2017-05-22 21:24:55Z tom.houdayer $
4
#
4
#
5
# alcasar-conup.sh
5
# alcasar-conup.sh
6
# by Rexy
6
# by Rexy
7
# This script is distributed under the Gnu General Public License (GPL)
7
# This script is distributed under the Gnu General Public License (GPL)
8
 
8
 
Line 22... Line 22...
22
#  3: warn_user (if imputability report has been generated)
22
#  3: warn_user (if imputability report has been generated)
23
#  5: WL
23
#  5: WL
24
#  6: BL
24
#  6: BL
25
#  7: HAVP
25
#  7: HAVP
26
 
26
 
27
if [ ${FILTER_ID:7:1} == '1' ]; then	# HAVP
27
if [ ${FILTER_ID:5:1} == '1' ]; then	# HAVP_WL
28
	set_filter="havp"
28
	set_filter="havp_wl"
29
elif [ ${FILTER_ID:6:1} == '1' ]; then	# HAVP_BL
29
elif [ ${FILTER_ID:6:1} == '1' ]; then	# HAVP_BL
30
	set_filter="havp_bl"
30
	set_filter="havp_bl"
31
elif [ ${FILTER_ID:5:1} == '1' ]; then	# HAVP_WL
31
elif [ ${FILTER_ID:7:1} == '1' ]; then	# HAVP
32
	set_filter="havp_wl"
32
	set_filter="havp"
33
else					# NOT_FILTERED
33
else					# NOT_FILTERED
34
	set_filter="not_filtered"
34
	set_filter="not_filtered"
35
fi
35
fi
36
 
36
 
37
if [ ${FILTER_ID:0:1} == '1' ]; then	# PROFILE 1 (WEB)
37
if [ ${FILTER_ID:2:1} == '1' ]; then	# PROFILE 3 (Custom)
38
	set_proto="proto_1";
38
	set_proto="proto_3";
39
elif [ ${FILTER_ID:1:1} == '1' ]; then	# PROFILE 2 (WEB + Mail + Remote access)
39
elif [ ${FILTER_ID:1:1} == '1' ]; then	# PROFILE 2 (WEB + Mail + Remote access)
40
	set_proto="proto_2";
40
	set_proto="proto_2";
41
elif [ ${FILTER_ID:2:1} == '1' ]; then	# PROFILE 3 (Custom)
41
elif [ ${FILTER_ID:0:1} == '1' ]; then	# PROFILE 1 (WEB)
42
	set_proto="proto_3";
42
	set_proto="proto_1";
43
else					# PROFILE 0 (Not filtered)
43
else					# PROFILE 0 (Not filtered)
44
	set_proto="proto_0";
44
	set_proto="proto_0";
45
fi
45
fi
46
 
46
 
47
ipset add $set_filter $FRAMED_IP_ADDRESS
47
ipset add $set_filter $FRAMED_IP_ADDRESS