Subversion Repositories configs

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
# -*- text -*-
2
######################################################################
3
#
4
#	This is a virtual server that handles *only* inner tunnel
5
#	requests for EAP-TTLS and PEAP types.
6
#
7
#	$Id$
8
#
9
######################################################################
10
 
11
server inner-tunnel {
12
 
13
#
14
#  This next section is here to allow testing of the "inner-tunnel"
15
#  authentication methods, independently from the "default" server.
16
#  It is listening on "localhost", so that it can only be used from
17
#  the same machine.
18
#
19
#	$ radtest USER PASSWORD 127.0.0.1:18120 0 testing123
20
#
21
#  If it works, you have configured the inner tunnel correctly.  To check
22
#  if PEAP will work, use:
23
#
24
#	$ radtest -t mschap USER PASSWORD 127.0.0.1:18120 0 testing123
25
#
26
#  If that works, PEAP should work.  If that command doesn't work, then
27
#
28
#	FIX THE INNER TUNNEL CONFIGURATION UNTIL IT WORKS.
29
#
30
#  Do NOT keep testing PEAP.  It won't help.
31
#
32
listen {
33
       ipaddr = 127.0.0.1
34
       port = 18120
35
       type = auth
36
}
37
 
38
 
39
#  Authorization. First preprocess (hints and huntgroups files),
40
#  then realms, and finally look in the "users" file.
41
#
42
#  The order of the realm modules will determine the order that
43
#  we try to find a matching realm.
44
#
45
#  Make *sure* that 'preprocess' comes before any realm if you
46
#  need to setup hints for the remote radius server
47
authorize {
48
	#
49
	#  The chap module will set 'Auth-Type := CHAP' if we are
50
	#  handling a CHAP request and Auth-Type has not already been set
51
	chap
52
 
53
	#
54
	#  If the users are logging in with an MS-CHAP-Challenge
55
	#  attribute for authentication, the mschap module will find
56
	#  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
57
	#  to the request, which will cause the server to then use
58
	#  the mschap module for authentication.
59
	mschap
60
 
61
	#
62
	#  Pull crypt'd passwords from /etc/passwd or /etc/shadow,
63
	#  using the system API's to get the password.  If you want
64
	#  to read /etc/passwd or /etc/shadow directly, see the
65
	#  passwd module, above.
66
	#
67
#	unix
68
 
69
	#
70
	#  Look for IPASS style 'realm/', and if not found, look for
71
	#  '@realm', and decide whether or not to proxy, based on
72
	#  that.
73
#	IPASS
74
 
75
	#
76
	#  If you are using multiple kinds of realms, you probably
77
	#  want to set "ignore_null = yes" for all of them.
78
	#  Otherwise, when the first style of realm doesn't match,
79
	#  the other styles won't be checked.
80
	#
81
	#  Note that proxying the inner tunnel authentication means
82
	#  that the user MAY use one identity in the outer session
83
	#  (e.g. "anonymous", and a different one here
84
	#  (e.g. "user@example.com").  The inner session will then be
85
	#  proxied elsewhere for authentication.  If you are not
86
	#  careful, this means that the user can cause you to forward
87
	#  the authentication to another RADIUS server, and have the
88
	#  accounting logs *not* sent to the other server.  This makes
89
	#  it difficult to bill people for their network activity.
90
	#
91
	suffix
92
#	ntdomain
93
 
94
	#
95
	#  The "suffix" module takes care of stripping the domain
96
	#  (e.g. "@example.com") from the User-Name attribute, and the
97
	#  next few lines ensure that the request is not proxied.
98
	#
99
	#  If you want the inner tunnel request to be proxied, delete
100
	#  the next few lines.
101
	#
102
	update control {
103
	       Proxy-To-Realm := LOCAL
104
	}
105
 
106
	#
107
	#  This module takes care of EAP-MSCHAPv2 authentication.
108
	#
109
	#  It also sets the EAP-Type attribute in the request
110
	#  attribute list to the EAP type from the packet.
111
	#
112
	#  The example below uses module failover to avoid querying all
113
	#  of the following modules if the EAP module returns "ok".
114
	#  Therefore, your LDAP and/or SQL servers will not be queried
115
	#  for the many packets that go back and forth to set up TTLS
116
	#  or PEAP.  The load on those servers will therefore be reduced.
117
	#
118
	eap {
119
		ok = return
120
	}
121
 
122
	#
123
	#  Read the 'users' file
124
	files
125
 
126
	#
127
	#  Look in an SQL database.  The schema of the database
128
	#  is meant to mirror the "users" file.
129
	#
130
	#  See "Authorization Queries" in sql.conf
131
#	sql
132
 
133
	#
134
	#  If you are using /etc/smbpasswd, and are also doing
135
	#  mschap authentication, the un-comment this line, and
136
	#  configure the 'etc_smbpasswd' module, above.
137
#	etc_smbpasswd
138
 
139
	#
140
	#  The ldap module will set Auth-Type to LDAP if it has not
141
	#  already been set
142
#	ldap
143
 
144
	#
145
	#  Enforce daily limits on time spent logged in.
146
#	daily
147
 
148
	#
149
	# Use the checkval module
150
#	checkval
151
 
152
	expiration
153
	logintime
154
 
155
	#
156
	#  If no other module has claimed responsibility for
157
	#  authentication, then try to use PAP.  This allows the
158
	#  other modules listed above to add a "known good" password
159
	#  to the request, and to do nothing else.  The PAP module
160
	#  will then see that password, and use it to do PAP
161
	#  authentication.
162
	#
163
	#  This module should be listed last, so that the other modules
164
	#  get a chance to set Auth-Type for themselves.
165
	#
166
	pap
167
}
168
 
169
 
170
#  Authentication.
171
#
172
#
173
#  This section lists which modules are available for authentication.
174
#  Note that it does NOT mean 'try each module in order'.  It means
175
#  that a module from the 'authorize' section adds a configuration
176
#  attribute 'Auth-Type := FOO'.  That authentication type is then
177
#  used to pick the apropriate module from the list below.
178
#
179
 
180
#  In general, you SHOULD NOT set the Auth-Type attribute.  The server
181
#  will figure it out on its own, and will do the right thing.  The
182
#  most common side effect of erroneously setting the Auth-Type
183
#  attribute is that one authentication method will work, but the
184
#  others will not.
185
#
186
#  The common reasons to set the Auth-Type attribute by hand
187
#  is to either forcibly reject the user, or forcibly accept him.
188
#
189
authenticate {
190
	#
191
	#  PAP authentication, when a back-end database listed
192
	#  in the 'authorize' section supplies a password.  The
193
	#  password can be clear-text, or encrypted.
194
	Auth-Type PAP {
195
		pap
196
	}
197
 
198
	#
199
	#  Most people want CHAP authentication
200
	#  A back-end database listed in the 'authorize' section
201
	#  MUST supply a CLEAR TEXT password.  Encrypted passwords
202
	#  won't work.
203
	Auth-Type CHAP {
204
		chap
205
	}
206
 
207
	#
208
	#  MSCHAP authentication.
209
	Auth-Type MS-CHAP {
210
		mschap
211
	}
212
 
213
	#
214
	#  Pluggable Authentication Modules.
215
#	pam
216
 
217
	#
218
	#  See 'man getpwent' for information on how the 'unix'
219
	#  module checks the users password.  Note that packets
220
	#  containing CHAP-Password attributes CANNOT be authenticated
221
	#  against /etc/passwd!  See the FAQ for details.
222
	#
223
	unix
224
 
225
	# Uncomment it if you want to use ldap for authentication
226
	#
227
	# Note that this means "check plain-text password against
228
	# the ldap database", which means that EAP won't work,
229
	# as it does not supply a plain-text password.
230
#	Auth-Type LDAP {
231
#		ldap
232
#	}
233
 
234
	#
235
	#  Allow EAP authentication.
236
	eap
237
}
238
 
239
######################################################################
240
#
241
#	There are no accounting requests inside of EAP-TTLS or PEAP
242
#	tunnels.
243
#
244
######################################################################
245
 
246
 
247
#  Session database, used for checking Simultaneous-Use. Either the radutmp
248
#  or rlm_sql module can handle this.
249
#  The rlm_sql module is *much* faster
250
session {
251
	radutmp
252
 
253
	#
254
	#  See "Simultaneous Use Checking Queries" in sql.conf
255
#	sql
256
}
257
 
258
 
259
#  Post-Authentication
260
#  Once we KNOW that the user has been authenticated, there are
261
#  additional steps we can take.
262
post-auth {
263
	# Note that we do NOT assign IP addresses here.
264
	# If you try to assign IP addresses for EAP authentication types,
265
	# it WILL NOT WORK.  You MUST use DHCP.
266
 
267
	#
268
	#  If you want to have a log of authentication replies,
269
	#  un-comment the following line, and the 'detail reply_log'
270
	#  section, above.
271
#	reply_log
272
 
273
	#
274
	#  After authenticating the user, do another SQL query.
275
	#
276
	#  See "Authentication Logging Queries" in sql.conf
277
#	sql
278
 
279
	#
280
	#  Instead of sending the query to the SQL server,
281
	#  write it into a log file.
282
	#
283
#	sql_log
284
 
285
	#
286
	#  Un-comment the following if you have set
287
	#  'edir_account_policy_check = yes' in the ldap module sub-section of
288
	#  the 'modules' section.
289
	#
290
#	ldap
291
 
292
	#
293
	#  Access-Reject packets are sent through the REJECT sub-section of the
294
	#  post-auth section.
295
	#
296
	#  Add the ldap module name (or instance) if you have set
297
	#  'edir_account_policy_check = yes' in the ldap module configuration
298
	#
299
	Post-Auth-Type REJECT {
300
		# log failed authentications in SQL, too.
301
#		sql
302
		attr_filter.access_reject
303
	}
304
 
305
	#
306
	#  The example policy below updates the outer tunnel reply
307
	#  (usually Access-Accept) with the User-Name from the inner
308
	#  tunnel User-Name.  Since this section is processed in the
309
	#  context of the inner tunnel, "request" here means "inner
310
	#  tunnel request", and "outer.reply" means "outer tunnel
311
	#  reply attributes".
312
	#
313
	#  This example is most useful when the outer session contains
314
	#  a User-Name of "anonymous@....", or a MAC address.  If it
315
	#  is enabled, the NAS SHOULD use the inner tunnel User-Name
316
	#  in subsequent accounting packets.  This makes it easier to
317
	#  track user sessions, as they will all be based on the real
318
	#  name, and not on "anonymous".
319
	#
320
	#  The problem with doing this is that it ALSO exposes the
321
	#  real user name to any intermediate proxies.  People use
322
	#  "anonymous" identifiers outside of the tunnel for a very
323
	#  good reason: it gives them more privacy.  Setting the reply
324
	#  to contain the real user name removes ALL privacy from
325
	#  their session.
326
	#
327
	#  If you want privacy to remain, see the
328
	#  Chargeable-User-Identity attribute from RFC 4372.  In order
329
	#  to use that attribute, you will have to allocate a
330
	#  per-session identifier for the user, and store it in a
331
	#  long-term database (e.g. SQL).  You should also use that
332
	#  attribute INSTEAD of the configuration below.
333
	#
334
	#update outer.reply {
335
	#	User-Name = "%{request:User-Name}"
336
	#}
337
 
338
}
339
 
340
#
341
#  When the server decides to proxy a request to a home server,
342
#  the proxied request is first passed through the pre-proxy
343
#  stage.  This stage can re-write the request, or decide to
344
#  cancel the proxy.
345
#
346
#  Only a few modules currently have this method.
347
#
348
pre-proxy {
349
#	attr_rewrite
350
 
351
	#  Uncomment the following line if you want to change attributes
352
	#  as defined in the preproxy_users file.
353
#	files
354
 
355
	#  Uncomment the following line if you want to filter requests
356
	#  sent to remote servers based on the rules defined in the
357
	#  'attrs.pre-proxy' file.
358
#	attr_filter.pre-proxy
359
 
360
	#  If you want to have a log of packets proxied to a home
361
	#  server, un-comment the following line, and the
362
	#  'detail pre_proxy_log' section, above.
363
#	pre_proxy_log
364
}
365
 
366
#
367
#  When the server receives a reply to a request it proxied
368
#  to a home server, the request may be massaged here, in the
369
#  post-proxy stage.
370
#
371
post-proxy {
372
 
373
	#  If you want to have a log of replies from a home server,
374
	#  un-comment the following line, and the 'detail post_proxy_log'
375
	#  section, above.
376
#	post_proxy_log
377
 
378
#	attr_rewrite
379
 
380
	#  Uncomment the following line if you want to filter replies from
381
	#  remote proxies based on the rules defined in the 'attrs' file.
382
#	attr_filter.post-proxy
383
 
384
	#
385
	#  If you are proxying LEAP, you MUST configure the EAP
386
	#  module, and you MUST list it here, in the post-proxy
387
	#  stage.
388
	#
389
	#  You MUST also use the 'nostrip' option in the 'realm'
390
	#  configuration.  Otherwise, the User-Name attribute
391
	#  in the proxied request will not match the user name
392
	#  hidden inside of the EAP packet, and the end server will
393
	#  reject the EAP request.
394
	#
395
	eap
396
 
397
	#
398
	#  If the server tries to proxy a request and fails, then the
399
	#  request is processed through the modules in this section.
400
	#
401
	#  The main use of this section is to permit robust proxying
402
	#  of accounting packets.  The server can be configured to
403
	#  proxy accounting packets as part of normal processing.
404
	#  Then, if the home server goes down, accounting packets can
405
	#  be logged to a local "detail" file, for processing with
406
	#  radrelay.  When the home server comes back up, radrelay
407
	#  will read the detail file, and send the packets to the
408
	#  home server.
409
	#
410
	#  With this configuration, the server always responds to
411
	#  Accounting-Requests from the NAS, but only writes
412
	#  accounting packets to disk if the home server is down.
413
	#
414
#	Post-Proxy-Type Fail {
415
#			detail
416
#	}
417
 
418
}
419
 
420
} # inner-tunnel server block