Subversion Repositories ALCASAR

Rev

Rev 2704 | 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
			}
2701 tom.houday 31
		}
2615 tom.houday 32
	}
2701 tom.houday 33
 
34
	sql { notfound = 1 }
35
	if ((notfound) && (!control:Auth-Type)) {
2615 tom.houday 36
		update reply {
37
			Reply-Message := "Username not found"
38
		}
39
		reject
40
	}
41
 
42
	expire_on_login { reject = 1 }
43
	if (reject) {
44
		update reply {
45
			Reply-Message := "Your usage time has been reached"
46
		}
47
		reject
48
	}
49
	noresetcounter { reject = 1 }
50
	if (reject) {
51
		update reply {
52
			Reply-Message := "Your maximum usage time has been reached"
53
		}
54
		reject
55
	}
56
	monthlycounter { reject = 1 }
57
	if (reject) {
58
		update reply {
59
			Reply-Message := "Your maximum monthly usage time has been reached"
60
		}
61
		reject
62
	}
63
	dailycounter { reject = 1 }
64
	if (reject) {
65
		update reply {
66
			Reply-Message := "Your maximum daily usage time has been reached"
67
		}
68
		reject
69
	}
70
 
2618 tom.houday 71
	counterCoovaChilliMaxAllTotalOctets { reject = 1 }
72
	if (reject) {
73
		update reply {
74
			Reply-Message := "Your maximum usage volume has been reached"
75
		}
76
		reject
77
	}
2615 tom.houday 78
	counterCoovaChilliMaxTotalOctetsMonthly { reject = 1 }
79
	if (reject) {
80
		update reply {
81
			Reply-Message := "Your maximum monthly usage volume has been reached"
82
		}
83
		reject
84
	}
85
	counterCoovaChilliMaxTotalOctetsDaily { reject = 1 }
86
	if (reject) {
87
		update reply {
88
			Reply-Message := "Your maximum daily usage volume has been reached"
89
		}
90
		reject
91
	}
92
 
93
	expiration { userlock = 1 }
94
	if (userlock) {
95
		update reply {
96
			Reply-Message := "Your expiration date has been reached"
97
		}
98
		userlock
99
	}
100
 
101
	logintime { userlock = 1 }
102
	if (userlock) {
103
		update reply {
104
			Reply-Message := "Your are out your allowed time period"
105
		}
106
		userlock
107
	}
108
 
2467 richard 109
	pap
110
}
111
authenticate {
112
	Auth-Type PAP {
113
		pap
114
	}
2701 tom.houday 115
	Auth-Type LDAP {
116
		ldap
117
	}
2467 richard 118
}
119
 
120
accounting {
121
	sql
122
}
123
 
124
session {
125
	sql
126
}
127
 
128
post-auth {
129
	Post-Auth-Type REJECT {
2615 tom.houday 130
		update reply {
131
			Reply-Message = "Login failed"
132
		}
2467 richard 133
		attr_filter.access_reject
134
	}
135
}
136
}