Subversion Repositories ALCASAR

Rev

Rev 2234 | 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$
3
# $Id: alcasar-macdown.sh 2249 2017-05-22 21:24:55Z tom.houdayer $
4
#
4
#
5
# Le script 'macdown' est appelé par coovachilli pendant le DHCP down (release)
5
# Le script 'macdown' est appelé par coovachilli pendant le DHCP down (release)
6
# Depuis la version 3.1 de ALCASAR, le système d'interception a changé.
6
# Depuis la version 3.1 de ALCASAR, le système d'interception a changé.
7
# Pour une adresse mac authorisée pour laquelle coovachilli effectue un DHCP release, l'@IP sera retiré de l'ipset 'not_filtered'
7
# Pour une adresse mac authorisée pour laquelle coovachilli effectue un DHCP release, l'@IP sera retiré de l'ipset 'not_filtered'
8
 
8
 
Line 30... Line 30...
30
	#  3: warn_user (if imputability report has been generated)
30
	#  3: warn_user (if imputability report has been generated)
31
	#  5: WL
31
	#  5: WL
32
	#  6: BL
32
	#  6: BL
33
	#  7: HAVP
33
	#  7: HAVP
34
 
34
 
35
	if [ ${FILTER_ID:7:1} == '1' ]; then	# HAVP
35
	if [ ${FILTER_ID:5:1} == '1' ]; then	# HAVP_WL
36
		set_filter="havp"
36
		set_filter="havp_wl"
37
	elif [ ${FILTER_ID:6:1} == '1' ]; then	# HAVP_BL
37
	elif [ ${FILTER_ID:6:1} == '1' ]; then	# HAVP_BL
38
		set_filter="havp_bl"
38
		set_filter="havp_bl"
39
	elif [ ${FILTER_ID:5:1} == '1' ]; then	# HAVP_WL
39
	elif [ ${FILTER_ID:7:1} == '1' ]; then	# HAVP
40
		set_filter="havp_wl"
40
		set_filter="havp"
41
	else					# NOT_FILTERED
41
	else					# NOT_FILTERED
42
		set_filter="not_filtered"
42
		set_filter="not_filtered"
43
	fi
43
	fi
44
 
44
 
45
	if [ ${FILTER_ID:0:1} == '1' ]; then	# PROFILE 1 (WEB)
45
	if [ ${FILTER_ID:2:1} == '1' ]; then	# PROFILE 3 (Custom)
46
		set_proto="proto_1";
46
		set_proto="proto_3";
47
	elif [ ${FILTER_ID:1:1} == '1' ]; then	# PROFILE 2 (WEB + Mail + Remote access)
47
	elif [ ${FILTER_ID:1:1} == '1' ]; then	# PROFILE 2 (WEB + Mail + Remote access)
48
		set_proto="proto_2";
48
		set_proto="proto_2";
49
	elif [ ${FILTER_ID:2:1} == '1' ]; then	# PROFILE 3 (Custom)
49
	elif [ ${FILTER_ID:0:1} == '1' ]; then	# PROFILE 1 (WEB)
50
		set_proto="proto_3";
50
		set_proto="proto_1";
51
	else					# PROFILE 0 (Not filtered)
51
	else					# PROFILE 0 (Not filtered)
52
		set_proto="proto_0";
52
		set_proto="proto_0";
53
	fi
53
	fi
54
 
54
 
55
	ipset del $set_filter $current_ip
55
	ipset del $set_filter $current_ip