Subversion Repositories ALCASAR

Rev

Rev 2712 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
2467 richard 1
server default {
2
listen {
3
	type = auth
4
	ipaddr = *
5
	port = 0
6
	limit {
7
		max_connections = 16
8
		lifetime = 0
9
		idle_timeout = 30
10
	}
11
}
12
 
13
listen {
14
	type = acct
15
	ipaddr = *
16
	port = 0
17
	limit {
18
		max_pps = 0
19
	}
20
}
21
 
22
authorize {
2704 tom.houday 23
#	if (!(&User-Name =~ /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/)) {
24
	if ((!&Calling-Station-Id) || (&User-Name != &Calling-Station-Id) || (!&User-Password) || (&User-Password != "password")) { # no LDAP query for @MAC
25
		ldap { fail = 1 }
26
		if ((ok || updated) && User-Password) {
27
			update control {
28
				Auth-Type := LDAP
2706 tom.houday 29
				Tmp-String-0 := "ldap" # AuthType SQL group
2704 tom.houday 30
			}
2712 tom.houday 31
			update reply {
32
				Filter-Id := "%{control:Tmp-String-0}"
33
			}
2701 tom.houday 34
		}
2615 tom.houday 35
	}
2701 tom.houday 36
 
37
	sql { notfound = 1 }
38
	if ((notfound) && (!control:Auth-Type)) {
2615 tom.houday 39
		update reply {
40
			Reply-Message := "Username not found"
41
		}
42
		reject
43
	}
44
 
45
	expire_on_login { reject = 1 }
46
	if (reject) {
47
		update reply {
48
			Reply-Message := "Your usage time has been reached"
49
		}
50
		reject
51
	}
52
	noresetcounter { reject = 1 }
53
	if (reject) {
54
		update reply {
55
			Reply-Message := "Your maximum usage time has been reached"
56
		}
57
		reject
58
	}
59
	monthlycounter { reject = 1 }
60
	if (reject) {
61
		update reply {
62
			Reply-Message := "Your maximum monthly usage time has been reached"
63
		}
64
		reject
65
	}
66
	dailycounter { reject = 1 }
67
	if (reject) {
68
		update reply {
69
			Reply-Message := "Your maximum daily usage time has been reached"
70
		}
71
		reject
72
	}
73
 
2618 tom.houday 74
	counterCoovaChilliMaxAllTotalOctets { reject = 1 }
75
	if (reject) {
76
		update reply {
77
			Reply-Message := "Your maximum usage volume has been reached"
78
		}
79
		reject
80
	}
2615 tom.houday 81
	counterCoovaChilliMaxTotalOctetsMonthly { reject = 1 }
82
	if (reject) {
83
		update reply {
84
			Reply-Message := "Your maximum monthly usage volume has been reached"
85
		}
86
		reject
87
	}
88
	counterCoovaChilliMaxTotalOctetsDaily { reject = 1 }
89
	if (reject) {
90
		update reply {
91
			Reply-Message := "Your maximum daily usage volume has been reached"
92
		}
93
		reject
94
	}
95
 
96
	expiration { userlock = 1 }
97
	if (userlock) {
98
		update reply {
99
			Reply-Message := "Your expiration date has been reached"
100
		}
101
		userlock
102
	}
103
 
104
	logintime { userlock = 1 }
105
	if (userlock) {
106
		update reply {
2882 rexy 107
			Reply-Message := "You are out your allowed time period"
2615 tom.houday 108
		}
109
		userlock
110
	}
111
 
2467 richard 112
	pap
113
}
114
authenticate {
115
	Auth-Type PAP {
116
		pap
117
	}
2701 tom.houday 118
	Auth-Type LDAP {
119
		ldap
120
	}
2467 richard 121
}
122
 
123
accounting {
124
	sql
125
}
126
 
127
session {
128
	sql
129
}
130
 
131
post-auth {
132
	Post-Auth-Type REJECT {
2615 tom.houday 133
		update reply {
134
			Reply-Message = "Login failed"
135
		}
2467 richard 136
		attr_filter.access_reject
137
	}
138
}
139
}