Browse Source

added radius config files

develop
Robin Thoni 7 years ago
parent
commit
ca532c16e1
98 changed files with 11356 additions and 0 deletions
  1. 87
    0
      freeradius/config/modules/mschap
  2. 865
    0
      freeradius/config/radiusd.conf
  3. 23
    0
      freeradius/config/tmp/freeradius/acct_users
  4. 129
    0
      freeradius/config/tmp/freeradius/attrs
  5. 19
    0
      freeradius/config/tmp/freeradius/attrs.access_challenge
  6. 17
    0
      freeradius/config/tmp/freeradius/attrs.access_reject
  7. 15
    0
      freeradius/config/tmp/freeradius/attrs.accounting_response
  8. 62
    0
      freeradius/config/tmp/freeradius/attrs.pre-proxy
  9. 241
    0
      freeradius/config/tmp/freeradius/clients.conf
  10. 32
    0
      freeradius/config/tmp/freeradius/dictionary
  11. 688
    0
      freeradius/config/tmp/freeradius/eap.conf
  12. 450
    0
      freeradius/config/tmp/freeradius/experimental.conf
  13. 77
    0
      freeradius/config/tmp/freeradius/hints
  14. 46
    0
      freeradius/config/tmp/freeradius/huntgroups
  15. 76
    0
      freeradius/config/tmp/freeradius/ldap.attrmap
  16. 17
    0
      freeradius/config/tmp/freeradius/modules/acct_unique
  17. 31
    0
      freeradius/config/tmp/freeradius/modules/always
  18. 48
    0
      freeradius/config/tmp/freeradius/modules/attr_filter
  19. 46
    0
      freeradius/config/tmp/freeradius/modules/attr_rewrite
  20. 77
    0
      freeradius/config/tmp/freeradius/modules/cache
  21. 11
    0
      freeradius/config/tmp/freeradius/modules/chap
  22. 44
    0
      freeradius/config/tmp/freeradius/modules/checkval
  23. 82
    0
      freeradius/config/tmp/freeradius/modules/counter
  24. 25
    0
      freeradius/config/tmp/freeradius/modules/cui
  25. 93
    0
      freeradius/config/tmp/freeradius/modules/detail
  26. 27
    0
      freeradius/config/tmp/freeradius/modules/detail.example.com
  27. 75
    0
      freeradius/config/tmp/freeradius/modules/detail.log
  28. 33
    0
      freeradius/config/tmp/freeradius/modules/dhcp_sqlippool
  29. 13
    0
      freeradius/config/tmp/freeradius/modules/digest
  30. 32
    0
      freeradius/config/tmp/freeradius/modules/dynamic_clients
  31. 123
    0
      freeradius/config/tmp/freeradius/modules/echo
  32. 28
    0
      freeradius/config/tmp/freeradius/modules/etc_group
  33. 30
    0
      freeradius/config/tmp/freeradius/modules/exec
  34. 19
    0
      freeradius/config/tmp/freeradius/modules/expiration
  35. 20
    0
      freeradius/config/tmp/freeradius/modules/expr
  36. 46
    0
      freeradius/config/tmp/freeradius/modules/files
  37. 161
    0
      freeradius/config/tmp/freeradius/modules/inner-eap
  38. 75
    0
      freeradius/config/tmp/freeradius/modules/ippool
  39. 11
    0
      freeradius/config/tmp/freeradius/modules/krb5
  40. 197
    0
      freeradius/config/tmp/freeradius/modules/ldap
  41. 105
    0
      freeradius/config/tmp/freeradius/modules/linelog
  42. 31
    0
      freeradius/config/tmp/freeradius/modules/logintime
  43. 25
    0
      freeradius/config/tmp/freeradius/modules/mac2ip
  44. 18
    0
      freeradius/config/tmp/freeradius/modules/mac2vlan
  45. 87
    0
      freeradius/config/tmp/freeradius/modules/mschap
  46. 12
    0
      freeradius/config/tmp/freeradius/modules/ntlm_auth
  47. 13
    0
      freeradius/config/tmp/freeradius/modules/opendirectory
  48. 78
    0
      freeradius/config/tmp/freeradius/modules/otp
  49. 26
    0
      freeradius/config/tmp/freeradius/modules/pam
  50. 22
    0
      freeradius/config/tmp/freeradius/modules/pap
  51. 55
    0
      freeradius/config/tmp/freeradius/modules/passwd
  52. 58
    0
      freeradius/config/tmp/freeradius/modules/perl
  53. 21
    0
      freeradius/config/tmp/freeradius/modules/policy
  54. 58
    0
      freeradius/config/tmp/freeradius/modules/preprocess
  55. 26
    0
      freeradius/config/tmp/freeradius/modules/radrelay
  56. 53
    0
      freeradius/config/tmp/freeradius/modules/radutmp
  57. 46
    0
      freeradius/config/tmp/freeradius/modules/realm
  58. 35
    0
      freeradius/config/tmp/freeradius/modules/redis
  59. 28
    0
      freeradius/config/tmp/freeradius/modules/rediswho
  60. 40
    0
      freeradius/config/tmp/freeradius/modules/replicate
  61. 16
    0
      freeradius/config/tmp/freeradius/modules/smbpasswd
  62. 50
    0
      freeradius/config/tmp/freeradius/modules/smsotp
  63. 4
    0
      freeradius/config/tmp/freeradius/modules/soh
  64. 92
    0
      freeradius/config/tmp/freeradius/modules/sql_log
  65. 37
    0
      freeradius/config/tmp/freeradius/modules/sqlcounter_expire_on_login
  66. 16
    0
      freeradius/config/tmp/freeradius/modules/sradutmp
  67. 25
    0
      freeradius/config/tmp/freeradius/modules/unix
  68. 112
    0
      freeradius/config/tmp/freeradius/modules/wimax
  69. 283
    0
      freeradius/config/tmp/freeradius/policy.conf
  70. 185
    0
      freeradius/config/tmp/freeradius/policy.txt
  71. 31
    0
      freeradius/config/tmp/freeradius/preproxy_users
  72. 759
    0
      freeradius/config/tmp/freeradius/proxy.conf
  73. 865
    0
      freeradius/config/tmp/freeradius/radiusd.conf
  74. 335
    0
      freeradius/config/tmp/freeradius/sites-available/README
  75. 129
    0
      freeradius/config/tmp/freeradius/sites-available/buffered-sql
  76. 43
    0
      freeradius/config/tmp/freeradius/sites-available/coa
  77. 73
    0
      freeradius/config/tmp/freeradius/sites-available/control-socket
  78. 171
    0
      freeradius/config/tmp/freeradius/sites-available/copy-acct-to-home-server
  79. 140
    0
      freeradius/config/tmp/freeradius/sites-available/decoupled-accounting
  80. 660
    0
      freeradius/config/tmp/freeradius/sites-available/default
  81. 283
    0
      freeradius/config/tmp/freeradius/sites-available/dhcp
  82. 65
    0
      freeradius/config/tmp/freeradius/sites-available/dhcp.relay
  83. 224
    0
      freeradius/config/tmp/freeradius/sites-available/dynamic-clients
  84. 122
    0
      freeradius/config/tmp/freeradius/sites-available/example
  85. 421
    0
      freeradius/config/tmp/freeradius/sites-available/inner-tunnel
  86. 190
    0
      freeradius/config/tmp/freeradius/sites-available/originate-coa
  87. 47
    0
      freeradius/config/tmp/freeradius/sites-available/proxy-inner-tunnel
  88. 167
    0
      freeradius/config/tmp/freeradius/sites-available/robust-proxy-accounting
  89. 34
    0
      freeradius/config/tmp/freeradius/sites-available/soh
  90. 127
    0
      freeradius/config/tmp/freeradius/sites-available/status
  91. 26
    0
      freeradius/config/tmp/freeradius/sites-available/virtual.example.com
  92. 98
    0
      freeradius/config/tmp/freeradius/sites-available/vmps
  93. 1
    0
      freeradius/config/tmp/freeradius/sites-enabled/default
  94. 1
    0
      freeradius/config/tmp/freeradius/sites-enabled/inner-tunnel
  95. 115
    0
      freeradius/config/tmp/freeradius/sql.conf
  96. 67
    0
      freeradius/config/tmp/freeradius/sqlippool.conf
  97. 108
    0
      freeradius/config/tmp/freeradius/templates.conf
  98. 206
    0
      freeradius/config/tmp/freeradius/users

+ 87
- 0
freeradius/config/modules/mschap View File

@@ -0,0 +1,87 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 9e016a09a158f55bbc9b48876f0cb2b776b4cd96 $
4
+
5
+# Microsoft CHAP authentication
6
+#
7
+#  This module supports MS-CHAP and MS-CHAPv2 authentication.
8
+#  It also enforces the SMB-Account-Ctrl attribute.
9
+#
10
+mschap {
11
+	#
12
+	#  If you are using /etc/smbpasswd, see the 'passwd'
13
+	#  module for an example of how to use /etc/smbpasswd
14
+
15
+	# if use_mppe is not set to no mschap will
16
+	# add MS-CHAP-MPPE-Keys for MS-CHAPv1 and
17
+	# MS-MPPE-Recv-Key/MS-MPPE-Send-Key for MS-CHAPv2
18
+	#
19
+	use_mppe = yes
20
+
21
+	# if mppe is enabled require_encryption makes
22
+	# encryption moderate
23
+	#
24
+	require_encryption = yes
25
+
26
+	# require_strong always requires 128 bit key
27
+	# encryption
28
+	#
29
+	require_strong = yes
30
+
31
+	# Windows sends us a username in the form of
32
+	# DOMAIN\user, but sends the challenge response
33
+	# based on only the user portion.  This hack
34
+	# corrects for that incorrect behavior.
35
+	#
36
+#	with_ntdomain_hack = no
37
+
38
+	# The module can perform authentication itself, OR
39
+	# use a Windows Domain Controller.  This configuration
40
+	# directive tells the module to call the ntlm_auth
41
+	# program, which will do the authentication, and return
42
+	# the NT-Key.  Note that you MUST have "winbindd" and
43
+	# "nmbd" running on the local machine for ntlm_auth
44
+	# to work.  See the ntlm_auth program documentation
45
+	# for details.
46
+	#
47
+	# If ntlm_auth is configured below, then the mschap
48
+	# module will call ntlm_auth for every MS-CHAP
49
+	# authentication request.  If there is a cleartext
50
+	# or NT hashed password available, you can set
51
+	# "MS-CHAP-Use-NTLM-Auth := No" in the control items,
52
+	# and the mschap module will do the authentication itself,
53
+	# without calling ntlm_auth.
54
+	#
55
+	# Be VERY careful when editing the following line!
56
+	#
57
+	# You can also try setting the user name as:
58
+	#
59
+	#	... --username=%{mschap:User-Name} ...
60
+	#
61
+	# In that case, the mschap module will look at the User-Name
62
+	# attribute, and do prefix/suffix checks in order to obtain
63
+	# the "best" user name for the request.
64
+	#
65
+#	ntlm_auth = "/path/to/ntlm_auth --request-nt-key --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} --challenge=%{%{mschap:Challenge}:-00} --nt-response=%{%{mschap:NT-Response}:-00}"
66
+
67
+	# The default is to wait 10 seconds for ntlm_auth to
68
+	# complete.  This is a long time, and if it's taking that
69
+	# long then you likely have other problems in your domain.
70
+	# The length of time can be decreased with the following
71
+	# option, which can save clients waiting if your ntlm_auth
72
+	# usually finishes quicker. Range 1 to 10 seconds.
73
+	#
74
+#	ntlm_auth_timeout = 10
75
+
76
+	# For Apple Server, when running on the same machine as
77
+	# Open Directory.  It has no effect on other systems.
78
+	#
79
+#	use_open_directory = yes
80
+
81
+	# On failure, set (or not) the MS-CHAP error code saying
82
+	# "retries allowed".
83
+#	allow_retry = yes
84
+
85
+	# An optional retry message.
86
+#	retry_msg = "Re-enter (or reset) the password"
87
+}

+ 865
- 0
freeradius/config/radiusd.conf View File

@@ -0,0 +1,865 @@
1
+# -*- text -*-
2
+##
3
+## radiusd.conf	-- FreeRADIUS server configuration file.
4
+##
5
+##	http://www.freeradius.org/
6
+##	$Id: 201b70b31b5bb4c2ef98c102690daa3462d5e1e3 $
7
+##
8
+
9
+######################################################################
10
+#
11
+#	Read "man radiusd" before editing this file.  See the section
12
+#	titled DEBUGGING.  It outlines a method where you can quickly
13
+#	obtain the configuration you want, without running into
14
+#	trouble.
15
+#
16
+#	Run the server in debugging mode, and READ the output.
17
+#
18
+#		$ radiusd -X
19
+#
20
+#	We cannot emphasize this point strongly enough.  The vast
21
+#	majority of problems can be solved by carefully reading the
22
+#	debugging output, which includes warnings about common issues,
23
+#	and suggestions for how they may be fixed.
24
+#
25
+#	There may be a lot of output, but look carefully for words like:
26
+#	"warning", "error", "reject", or "failure".  The messages there
27
+#	will usually be enough to guide you to a solution.
28
+#
29
+#	If you are going to ask a question on the mailing list, then
30
+#	explain what you are trying to do, and include the output from
31
+#	debugging mode (radiusd -X).  Failure to do so means that all
32
+#	of the responses to your question will be people telling you
33
+#	to "post the output of radiusd -X".
34
+
35
+######################################################################
36
+#
37
+#  	The location of other config files and logfiles are declared
38
+#  	in this file.
39
+#
40
+#  	Also general configuration for modules can be done in this
41
+#  	file, it is exported through the API to modules that ask for
42
+#  	it.
43
+#
44
+#	See "man radiusd.conf" for documentation on the format of this
45
+#	file.  Note that the individual configuration items are NOT
46
+#	documented in that "man" page.  They are only documented here,
47
+#	in the comments.
48
+#
49
+#	As of 2.0.0, FreeRADIUS supports a simple processing language
50
+#	in the "authorize", "authenticate", "accounting", etc. sections.
51
+#	See "man unlang" for details.
52
+#
53
+
54
+prefix = /usr
55
+exec_prefix = /usr
56
+sysconfdir = /etc
57
+localstatedir = /var
58
+sbindir = ${exec_prefix}/sbin
59
+logdir = /var/log/freeradius
60
+raddbdir = /etc/freeradius
61
+radacctdir = ${logdir}/radacct
62
+
63
+#
64
+#  name of the running server.  See also the "-n" command-line option.
65
+name = freeradius
66
+
67
+#  Location of config and logfiles.
68
+confdir = ${raddbdir}
69
+run_dir = ${localstatedir}/run/${name}
70
+
71
+# Should likely be ${localstatedir}/lib/radiusd
72
+db_dir = ${raddbdir}
73
+
74
+#
75
+# libdir: Where to find the rlm_* modules.
76
+#
77
+#   This should be automatically set at configuration time.
78
+#
79
+#   If the server builds and installs, but fails at execution time
80
+#   with an 'undefined symbol' error, then you can use the libdir
81
+#   directive to work around the problem.
82
+#
83
+#   The cause is usually that a library has been installed on your
84
+#   system in a place where the dynamic linker CANNOT find it.  When
85
+#   executing as root (or another user), your personal environment MAY
86
+#   be set up to allow the dynamic linker to find the library.  When
87
+#   executing as a daemon, FreeRADIUS MAY NOT have the same
88
+#   personalized configuration.
89
+#
90
+#   To work around the problem, find out which library contains that symbol,
91
+#   and add the directory containing that library to the end of 'libdir',
92
+#   with a colon separating the directory names.  NO spaces are allowed.
93
+#
94
+#   e.g. libdir = /usr/local/lib:/opt/package/lib
95
+#
96
+#   You can also try setting the LD_LIBRARY_PATH environment variable
97
+#   in a script which starts the server.
98
+#
99
+#   If that does not work, then you can re-configure and re-build the
100
+#   server to NOT use shared libraries, via:
101
+#
102
+#	./configure --disable-shared
103
+#	make
104
+#	make install
105
+#
106
+libdir = /usr/lib/freeradius
107
+
108
+#  pidfile: Where to place the PID of the RADIUS server.
109
+#
110
+#  The server may be signalled while it's running by using this
111
+#  file.
112
+#
113
+#  This file is written when ONLY running in daemon mode.
114
+#
115
+#  e.g.:  kill -HUP `cat /var/run/radiusd/radiusd.pid`
116
+#
117
+pidfile = ${run_dir}/${name}.pid
118
+
119
+#  chroot: directory where the server does "chroot".
120
+#
121
+#  The chroot is done very early in the process of starting the server.
122
+#  After the chroot has been performed it switches to the "user" listed
123
+#  below (which MUST be specified).  If "group" is specified, it switchs
124
+#  to that group, too.  Any other groups listed for the specified "user"
125
+#  in "/etc/group" are also added as part of this process.
126
+#
127
+#  The current working directory (chdir / cd) is left *outside* of the
128
+#  chroot until all of the modules have been initialized.  This allows
129
+#  the "raddb" directory to be left outside of the chroot.  Once the
130
+#  modules have been initialized, it does a "chdir" to ${logdir}.  This
131
+#  means that it should be impossible to break out of the chroot.
132
+#
133
+#  If you are worried about security issues related to this use of chdir,
134
+#  then simply ensure that the "raddb" directory is inside of the chroot,
135
+#  end be sure to do "cd raddb" BEFORE starting the server.
136
+#
137
+#  If the server is statically linked, then the only files that have
138
+#  to exist in the chroot are ${run_dir} and ${logdir}.  If you do the
139
+#  "cd raddb" as discussed above, then the "raddb" directory has to be
140
+#  inside of the chroot directory, too.
141
+#
142
+#chroot = /path/to/chroot/directory
143
+
144
+# user/group: The name (or #number) of the user/group to run radiusd as.
145
+#
146
+#   If these are commented out, the server will run as the user/group
147
+#   that started it.  In order to change to a different user/group, you
148
+#   MUST be root ( or have root privleges ) to start the server.
149
+#
150
+#   We STRONGLY recommend that you run the server with as few permissions
151
+#   as possible.  That is, if you're not using shadow passwords, the
152
+#   user and group items below should be set to radius'.
153
+#
154
+#  NOTE that some kernels refuse to setgid(group) when the value of
155
+#  (unsigned)group is above 60000; don't use group nobody on these systems!
156
+#
157
+#  On systems with shadow passwords, you might have to set 'group = shadow'
158
+#  for the server to be able to read the shadow password file.  If you can
159
+#  authenticate users while in debug mode, but not in daemon mode, it may be
160
+#  that the debugging mode server is running as a user that can read the
161
+#  shadow info, and the user listed below can not.
162
+#
163
+#  The server will also try to use "initgroups" to read /etc/groups.
164
+#  It will join all groups where "user" is a member.  This can allow
165
+#  for some finer-grained access controls.
166
+#
167
+user = freerad
168
+group = freerad
169
+
170
+#  panic_action: Command to execute if the server dies unexpectedly.
171
+#
172
+#  FOR PRODUCTION SYSTEMS, ACTIONS SHOULD ALWAYS EXIT.
173
+#  AN INTERACTIVE ACTION MEANS THE SERVER IS NOT RESPONDING TO REQUESTS.
174
+#  AN INTERACTICE ACTION MEANS THE SERVER WILL NOT RESTART.
175
+#
176
+#  The panic action is a command which will be executed if the server
177
+#  receives a fatal, non user generated signal, i.e. SIGSEGV, SIGBUS,
178
+#  SIGABRT or SIGFPE.
179
+#
180
+#  This can be used to start an interactive debugging session so
181
+#  that information regarding the current state of the server can
182
+#  be acquired.
183
+#
184
+#  The following string substitutions are available:
185
+#  - %e   The currently executing program e.g. /sbin/radiusd
186
+#  - %p   The PID of the currently executing program e.g. 12345
187
+#
188
+#  Standard ${} substitutions are also allowed.
189
+#
190
+#  An example panic action for opening an interactive session in GDB would be:
191
+#
192
+#panic_action = "gdb %e %p"
193
+#
194
+#  Again, don't use that on a production system.
195
+#
196
+#  An example panic action for opening an automated session in GDB would be:
197
+#
198
+#panic_action = "gdb -silent -x ${raddbdir}/panic.gdb %e %p > ${logdir}/gdb-%e-%p.log 2>&1"
199
+#
200
+#  That command can be used on a production system.
201
+#
202
+
203
+#  max_request_time: The maximum time (in seconds) to handle a request.
204
+#
205
+#  Requests which take more time than this to process may be killed, and
206
+#  a REJECT message is returned.
207
+#
208
+#  WARNING: If you notice that requests take a long time to be handled,
209
+#  then this MAY INDICATE a bug in the server, in one of the modules
210
+#  used to handle a request, OR in your local configuration.
211
+#
212
+#  This problem is most often seen when using an SQL database.  If it takes
213
+#  more than a second or two to receive an answer from the SQL database,
214
+#  then it probably means that you haven't indexed the database.  See your
215
+#  SQL server documentation for more information.
216
+#
217
+#  Useful range of values: 5 to 120
218
+#
219
+max_request_time = 30
220
+
221
+#  cleanup_delay: The time to wait (in seconds) before cleaning up
222
+#  a reply which was sent to the NAS.
223
+#
224
+#  The RADIUS request is normally cached internally for a short period
225
+#  of time, after the reply is sent to the NAS.  The reply packet may be
226
+#  lost in the network, and the NAS will not see it.  The NAS will then
227
+#  re-send the request, and the server will respond quickly with the
228
+#  cached reply.
229
+#
230
+#  If this value is set too low, then duplicate requests from the NAS
231
+#  MAY NOT be detected, and will instead be handled as seperate requests.
232
+#
233
+#  If this value is set too high, then the server will cache too many
234
+#  requests, and some new requests may get blocked.  (See 'max_requests'.)
235
+#
236
+#  Useful range of values: 2 to 10
237
+#
238
+cleanup_delay = 5
239
+
240
+#  max_requests: The maximum number of requests which the server keeps
241
+#  track of.  This should be 256 multiplied by the number of clients.
242
+#  e.g. With 4 clients, this number should be 1024.
243
+#
244
+#  If this number is too low, then when the server becomes busy,
245
+#  it will not respond to any new requests, until the 'cleanup_delay'
246
+#  time has passed, and it has removed the old requests.
247
+#
248
+#  If this number is set too high, then the server will use a bit more
249
+#  memory for no real benefit.
250
+#
251
+#  If you aren't sure what it should be set to, it's better to set it
252
+#  too high than too low.  Setting it to 1000 per client is probably
253
+#  the highest it should be.
254
+#
255
+#  Useful range of values: 256 to infinity
256
+#
257
+max_requests = 1024
258
+
259
+#  listen: Make the server listen on a particular IP address, and send
260
+#  replies out from that address. This directive is most useful for
261
+#  hosts with multiple IP addresses on one interface.
262
+#
263
+#  If you want the server to listen on additional addresses, or on
264
+#  additionnal ports, you can use multiple "listen" sections.
265
+#
266
+#  Each section make the server listen for only one type of packet,
267
+#  therefore authentication and accounting have to be configured in
268
+#  different sections.
269
+#
270
+#  The server ignore all "listen" section if you are using '-i' and '-p'
271
+#  on the command line.
272
+#
273
+listen {
274
+	#  Type of packets to listen for.
275
+	#  Allowed values are:
276
+	#	auth	listen for authentication packets
277
+	#	acct	listen for accounting packets
278
+	#	proxy   IP to use for sending proxied packets
279
+	#	detail  Read from the detail file.  For examples, see
280
+	#               raddb/sites-available/copy-acct-to-home-server
281
+	#	status  listen for Status-Server packets.  For examples,
282
+	#		see raddb/sites-available/status
283
+	#	coa     listen for CoA-Request and Disconnect-Request
284
+	#		packets.  For examples, see the file
285
+	#		raddb/sites-available/coa
286
+	#
287
+	type = auth
288
+
289
+	#  Note: "type = proxy" lets you control the source IP used for
290
+	#        proxying packets, with some limitations:
291
+	#
292
+	#    * A proxy listener CANNOT be used in a virtual server section.
293
+	#    * You should probably set "port = 0".
294
+	#    * Any "clients" configuration will be ignored.
295
+	#
296
+	#  See also proxy.conf, and the "src_ipaddr" configuration entry
297
+	#  in the sample "home_server" section.  When you specify the
298
+	#  source IP address for packets sent to a home server, the
299
+	#  proxy listeners are automatically created.
300
+
301
+	#  IP address on which to listen.
302
+	#  Allowed values are:
303
+	#	dotted quad (1.2.3.4)
304
+	#       hostname    (radius.example.com)
305
+	#       wildcard    (*)
306
+	ipaddr = *
307
+
308
+	#  OR, you can use an IPv6 address, but not both
309
+	#  at the same time.
310
+#	ipv6addr = ::	# any.  ::1 == localhost
311
+
312
+	#  Port on which to listen.
313
+	#  Allowed values are:
314
+	#	integer port number (1812)
315
+	#	0 means "use /etc/services for the proper port"
316
+	port = 0
317
+
318
+	#  Some systems support binding to an interface, in addition
319
+	#  to the IP address.  This feature isn't strictly necessary,
320
+	#  but for sites with many IP addresses on one interface,
321
+	#  it's useful to say "listen on all addresses for eth0".
322
+	#
323
+	#  If your system does not support this feature, you will
324
+	#  get an error if you try to use it.
325
+	#
326
+#	interface = eth0
327
+
328
+	#  Per-socket lists of clients.  This is a very useful feature.
329
+	#
330
+	#  The name here is a reference to a section elsewhere in
331
+	#  radiusd.conf, or clients.conf.  Having the name as
332
+	#  a reference allows multiple sockets to use the same
333
+	#  set of clients.
334
+	#
335
+	#  If this configuration is used, then the global list of clients
336
+	#  is IGNORED for this "listen" section.  Take care configuring
337
+	#  this feature, to ensure you don't accidentally disable a
338
+	#  client you need.
339
+	#
340
+	#  See clients.conf for the configuration of "per_socket_clients".
341
+	#
342
+#	clients = per_socket_clients
343
+}
344
+
345
+#  This second "listen" section is for listening on the accounting
346
+#  port, too.
347
+#
348
+listen {
349
+	ipaddr = *
350
+#	ipv6addr = ::
351
+	port = 0
352
+	type = acct
353
+#	interface = eth0
354
+#	clients = per_socket_clients
355
+}
356
+
357
+#  hostname_lookups: Log the names of clients or just their IP addresses
358
+#  e.g., www.freeradius.org (on) or 206.47.27.232 (off).
359
+#
360
+#  The default is 'off' because it would be overall better for the net
361
+#  if people had to knowingly turn this feature on, since enabling it
362
+#  means that each client request will result in AT LEAST one lookup
363
+#  request to the nameserver.   Enabling hostname_lookups will also
364
+#  mean that your server may stop randomly for 30 seconds from time
365
+#  to time, if the DNS requests take too long.
366
+#
367
+#  Turning hostname lookups off also means that the server won't block
368
+#  for 30 seconds, if it sees an IP address which has no name associated
369
+#  with it.
370
+#
371
+#  allowed values: {no, yes}
372
+#
373
+hostname_lookups = no
374
+
375
+#  Core dumps are a bad thing.  This should only be set to 'yes'
376
+#  if you're debugging a problem with the server.
377
+#
378
+#  allowed values: {no, yes}
379
+#
380
+allow_core_dumps = no
381
+
382
+#  Regular expressions
383
+#
384
+#  These items are set at configure time.  If they're set to "yes",
385
+#  then setting them to "no" turns off regular expression support.
386
+#
387
+#  If they're set to "no" at configure time, then setting them to "yes"
388
+#  WILL NOT WORK.  It will give you an error.
389
+#
390
+regular_expressions	= yes
391
+extended_expressions	= yes
392
+
393
+#
394
+#  Logging section.  The various "log_*" configuration items
395
+#  will eventually be moved here.
396
+#
397
+log {
398
+	#
399
+	#  Destination for log messages.  This can be one of:
400
+	#
401
+	#	files - log to "file", as defined below.
402
+	#	syslog - to syslog (see also the "syslog_facility", below.
403
+	#	stdout - standard output
404
+	#	stderr - standard error.
405
+	#
406
+	#  The command-line option "-X" over-rides this option, and forces
407
+	#  logging to go to stdout.
408
+	#
409
+	destination = files
410
+
411
+	#
412
+	#  The logging messages for the server are appended to the
413
+	#  tail of this file if destination == "files"
414
+	#
415
+	#  If the server is running in debugging mode, this file is
416
+	#  NOT used.
417
+	#
418
+	file = ${logdir}/radius.log
419
+
420
+	#
421
+	#  If this configuration parameter is set, then log messages for
422
+	#  a *request* go to this file, rather than to radius.log.
423
+	#
424
+	#  i.e. This is a log file per request, once the server has accepted
425
+	#  the request as being from a valid client.  Messages that are
426
+	#  not associated with a request still go to radius.log.
427
+	#
428
+	#  Not all log messages in the server core have been updated to use
429
+	#  this new internal API.  As a result, some messages will still
430
+	#  go to radius.log.  Please submit patches to fix this behavior.
431
+	#
432
+	#  The file name is expanded dynamically.  You should ONLY user
433
+	#  server-side attributes for the filename (e.g. things you control).
434
+	#  Using this feature MAY also slow down the server substantially,
435
+	#  especially if you do thinks like SQL calls as part of the
436
+	#  expansion of the filename.
437
+	#
438
+	#  The name of the log file should use attributes that don't change
439
+	#  over the lifetime of a request, such as User-Name,
440
+	#  Virtual-Server or Packet-Src-IP-Address.  Otherwise, the log
441
+	#  messages will be distributed over multiple files.
442
+	#
443
+	#  Logging can be enabled for an individual request by a special
444
+	#  dynamic expansion macro:  %{debug: 1}, where the debug level
445
+	#  for this request is set to '1' (or 2, 3, etc.).  e.g.
446
+	#
447
+	#	...
448
+	#	update control {
449
+	#	       Tmp-String-0 = "%{debug:1}"
450
+	#	}
451
+	#	...
452
+	#
453
+	#  The attribute that the value is assigned to is unimportant,
454
+	#  and should be a "throw-away" attribute with no side effects.
455
+	#
456
+	#requests = ${logdir}/radiusd-%{%{Virtual-Server}:-DEFAULT}-%Y%m%d.log
457
+
458
+	#
459
+	#  Which syslog facility to use, if ${destination} == "syslog"
460
+	#
461
+	#  The exact values permitted here are OS-dependent.  You probably
462
+	#  don't want to change this.
463
+	#
464
+	syslog_facility = daemon
465
+
466
+	#  Log the full User-Name attribute, as it was found in the request.
467
+	#
468
+	# allowed values: {no, yes}
469
+	#
470
+	stripped_names = no
471
+
472
+	#  Log authentication requests to the log file.
473
+	#
474
+	#  allowed values: {no, yes}
475
+	#
476
+	auth = no
477
+
478
+	#  Log passwords with the authentication requests.
479
+	#  auth_badpass  - logs password if it's rejected
480
+	#  auth_goodpass - logs password if it's correct
481
+	#
482
+	#  allowed values: {no, yes}
483
+	#
484
+	auth_badpass = no
485
+	auth_goodpass = no
486
+
487
+	#  Log additional text at the end of the "Login OK" messages.
488
+	#  for these to work, the "auth" and "auth_goopass" or "auth_badpass"
489
+	#  configurations above have to be set to "yes".
490
+	#
491
+	#  The strings below are dynamically expanded, which means that
492
+	#  you can put anything you want in them.  However, note that
493
+	#  this expansion can be slow, and can negatively impact server
494
+	#  performance.
495
+	#
496
+#	msg_goodpass = ""
497
+#	msg_badpass = ""
498
+}
499
+
500
+#  The program to execute to do concurrency checks.
501
+checkrad = ${sbindir}/checkrad
502
+
503
+# SECURITY CONFIGURATION
504
+#
505
+#  There may be multiple methods of attacking on the server.  This
506
+#  section holds the configuration items which minimize the impact
507
+#  of those attacks
508
+#
509
+security {
510
+	#
511
+	#  max_attributes: The maximum number of attributes
512
+	#  permitted in a RADIUS packet.  Packets which have MORE
513
+	#  than this number of attributes in them will be dropped.
514
+	#
515
+	#  If this number is set too low, then no RADIUS packets
516
+	#  will be accepted.
517
+	#
518
+	#  If this number is set too high, then an attacker may be
519
+	#  able to send a small number of packets which will cause
520
+	#  the server to use all available memory on the machine.
521
+	#
522
+	#  Setting this number to 0 means "allow any number of attributes"
523
+	max_attributes = 200
524
+
525
+	#
526
+	#  reject_delay: When sending an Access-Reject, it can be
527
+	#  delayed for a few seconds.  This may help slow down a DoS
528
+	#  attack.  It also helps to slow down people trying to brute-force
529
+	#  crack a users password.
530
+	#
531
+	#  Setting this number to 0 means "send rejects immediately"
532
+	#
533
+	#  If this number is set higher than 'cleanup_delay', then the
534
+	#  rejects will be sent at 'cleanup_delay' time, when the request
535
+	#  is deleted from the internal cache of requests.
536
+	#
537
+	#  Useful ranges: 1 to 5
538
+	reject_delay = 1
539
+
540
+	#
541
+	#  status_server: Whether or not the server will respond
542
+	#  to Status-Server requests.
543
+	#
544
+	#  When sent a Status-Server message, the server responds with
545
+	#  an Access-Accept or Accounting-Response packet.
546
+	#
547
+	#  This is mainly useful for administrators who want to "ping"
548
+	#  the server, without adding test users, or creating fake
549
+	#  accounting packets.
550
+	#
551
+	#  It's also useful when a NAS marks a RADIUS server "dead".
552
+	#  The NAS can periodically "ping" the server with a Status-Server
553
+	#  packet.  If the server responds, it must be alive, and the
554
+	#  NAS can start using it for real requests.
555
+	#
556
+	#  See also raddb/sites-available/status
557
+	#
558
+	status_server = yes
559
+
560
+	#
561
+	#  allow_vulnerable_openssl: Allow the server to start with
562
+	#  versions of OpenSSL known to have critical vulnerabilities.
563
+	#
564
+	#  This check is based on the version number reported by libssl
565
+	#  and may not reflect patches applied to libssl by
566
+	#  distribution maintainers.
567
+	#
568
+	allow_vulnerable_openssl = no
569
+}
570
+
571
+# PROXY CONFIGURATION
572
+#
573
+#  proxy_requests: Turns proxying of RADIUS requests on or off.
574
+#
575
+#  The server has proxying turned on by default.  If your system is NOT
576
+#  set up to proxy requests to another server, then you can turn proxying
577
+#  off here.  This will save a small amount of resources on the server.
578
+#
579
+#  If you have proxying turned off, and your configuration files say
580
+#  to proxy a request, then an error message will be logged.
581
+#
582
+#  To disable proxying, change the "yes" to "no", and comment the
583
+#  $INCLUDE line.
584
+#
585
+#  allowed values: {no, yes}
586
+#
587
+proxy_requests  = yes
588
+$INCLUDE proxy.conf
589
+
590
+
591
+# CLIENTS CONFIGURATION
592
+#
593
+#  Client configuration is defined in "clients.conf".
594
+#
595
+
596
+#  The 'clients.conf' file contains all of the information from the old
597
+#  'clients' and 'naslist' configuration files.  We recommend that you
598
+#  do NOT use 'client's or 'naslist', although they are still
599
+#  supported.
600
+#
601
+#  Anything listed in 'clients.conf' will take precedence over the
602
+#  information from the old-style configuration files.
603
+#
604
+$INCLUDE clients.conf
605
+
606
+
607
+# THREAD POOL CONFIGURATION
608
+#
609
+#  The thread pool is a long-lived group of threads which
610
+#  take turns (round-robin) handling any incoming requests.
611
+#
612
+#  You probably want to have a few spare threads around,
613
+#  so that high-load situations can be handled immediately.  If you
614
+#  don't have any spare threads, then the request handling will
615
+#  be delayed while a new thread is created, and added to the pool.
616
+#
617
+#  You probably don't want too many spare threads around,
618
+#  otherwise they'll be sitting there taking up resources, and
619
+#  not doing anything productive.
620
+#
621
+#  The numbers given below should be adequate for most situations.
622
+#
623
+thread pool {
624
+	#  Number of servers to start initially --- should be a reasonable
625
+	#  ballpark figure.
626
+	start_servers = 5
627
+
628
+	#  Limit on the total number of servers running.
629
+	#
630
+	#  If this limit is ever reached, clients will be LOCKED OUT, so it
631
+	#  should NOT BE SET TOO LOW.  It is intended mainly as a brake to
632
+	#  keep a runaway server from taking the system with it as it spirals
633
+	#  down...
634
+	#
635
+	#  You may find that the server is regularly reaching the
636
+	#  'max_servers' number of threads, and that increasing
637
+	#  'max_servers' doesn't seem to make much difference.
638
+	#
639
+	#  If this is the case, then the problem is MOST LIKELY that
640
+	#  your back-end databases are taking too long to respond, and
641
+	#  are preventing the server from responding in a timely manner.
642
+	#
643
+	#  The solution is NOT do keep increasing the 'max_servers'
644
+	#  value, but instead to fix the underlying cause of the
645
+	#  problem: slow database, or 'hostname_lookups=yes'.
646
+	#
647
+	#  For more information, see 'max_request_time', above.
648
+	#
649
+	max_servers = 32
650
+
651
+	#  Server-pool size regulation.  Rather than making you guess
652
+	#  how many servers you need, FreeRADIUS dynamically adapts to
653
+	#  the load it sees, that is, it tries to maintain enough
654
+	#  servers to handle the current load, plus a few spare
655
+	#  servers to handle transient load spikes.
656
+	#
657
+	#  It does this by periodically checking how many servers are
658
+	#  waiting for a request.  If there are fewer than
659
+	#  min_spare_servers, it creates a new spare.  If there are
660
+	#  more than max_spare_servers, some of the spares die off.
661
+	#  The default values are probably OK for most sites.
662
+	#
663
+	min_spare_servers = 3
664
+	max_spare_servers = 10
665
+
666
+	#  When the server receives a packet, it places it onto an
667
+	#  internal queue, where the worker threads (configured above)
668
+	#  pick it up for processing.  The maximum size of that queue
669
+	#  is given here.
670
+	#
671
+	#  When the queue is full, any new packets will be silently
672
+	#  discarded.
673
+	#
674
+	#  The most common cause of the queue being full is that the
675
+	#  server is dependent on a slow database, and it has received
676
+	#  a large "spike" of traffic.  When that happens, there is
677
+	#  very little you can do other than make sure the server
678
+	#  receives less traffic, or make sure that the database can
679
+	#  handle the load.
680
+	#
681
+#	max_queue_size = 65536
682
+
683
+	#  There may be memory leaks or resource allocation problems with
684
+	#  the server.  If so, set this value to 300 or so, so that the
685
+	#  resources will be cleaned up periodically.
686
+	#
687
+	#  This should only be necessary if there are serious bugs in the
688
+	#  server which have not yet been fixed.
689
+	#
690
+	#  '0' is a special value meaning 'infinity', or 'the servers never
691
+	#  exit'
692
+	max_requests_per_server = 0
693
+}
694
+
695
+# MODULE CONFIGURATION
696
+#
697
+#  The names and configuration of each module is located in this section.
698
+#
699
+#  After the modules are defined here, they may be referred to by name,
700
+#  in other sections of this configuration file.
701
+#
702
+modules {
703
+	#
704
+	#  Each module has a configuration as follows:
705
+	#
706
+	#	name [ instance ] {
707
+	#		config_item = value
708
+	#		...
709
+	#	}
710
+	#
711
+	#  The 'name' is used to load the 'rlm_name' library
712
+	#  which implements the functionality of the module.
713
+	#
714
+	#  The 'instance' is optional.  To have two different instances
715
+	#  of a module, it first must be referred to by 'name'.
716
+	#  The different copies of the module are then created by
717
+	#  inventing two 'instance' names, e.g. 'instance1' and 'instance2'
718
+	#
719
+	#  The instance names can then be used in later configuration
720
+	#  INSTEAD of the original 'name'.  See the 'radutmp' configuration
721
+	#  for an example.
722
+	#
723
+
724
+	#
725
+	#  As of 2.0.5, most of the module configurations are in a
726
+	#  sub-directory.  Files matching the regex /[a-zA-Z0-9_.]+/
727
+	#  are loaded.  The modules are initialized ONLY if they are
728
+	#  referenced in a processing section, such as authorize,
729
+	#  authenticate, accounting, pre/post-proxy, etc.
730
+	#
731
+	$INCLUDE ${confdir}/modules/
732
+
733
+	#  Extensible Authentication Protocol
734
+	#
735
+	#  For all EAP related authentications.
736
+	#  Now in another file, because it is very large.
737
+	#
738
+	$INCLUDE eap.conf
739
+
740
+	#  Include another file that has the SQL-related configuration.
741
+	#  This is another file only because it tends to be big.
742
+	#
743
+#	$INCLUDE sql.conf
744
+
745
+	#
746
+	#  This module is an SQL enabled version of the counter module.
747
+	#
748
+	#  Rather than maintaining seperate (GDBM) databases of
749
+	#  accounting info for each counter, this module uses the data
750
+	#  stored in the raddacct table by the sql modules. This
751
+	#  module NEVER does any database INSERTs or UPDATEs.  It is
752
+	#  totally dependent on the SQL module to process Accounting
753
+	#  packets.
754
+	#
755
+#	$INCLUDE sql/mysql/counter.conf
756
+
757
+	#
758
+	#  IP addresses managed in an SQL table.
759
+	#
760
+#	$INCLUDE sqlippool.conf
761
+}
762
+
763
+# Instantiation
764
+#
765
+#  This section orders the loading of the modules.  Modules
766
+#  listed here will get loaded BEFORE the later sections like
767
+#  authorize, authenticate, etc. get examined.
768
+#
769
+#  This section is not strictly needed.  When a section like
770
+#  authorize refers to a module, it's automatically loaded and
771
+#  initialized.  However, some modules may not be listed in any
772
+#  of the following sections, so they can be listed here.
773
+#
774
+#  Also, listing modules here ensures that you have control over
775
+#  the order in which they are initalized.  If one module needs
776
+#  something defined by another module, you can list them in order
777
+#  here, and ensure that the configuration will be OK.
778
+#
779
+instantiate {
780
+	#
781
+	#  Allows the execution of external scripts.
782
+	#  The entire command line (and output) must fit into 253 bytes.
783
+	#
784
+	#  e.g. Framed-Pool = `%{exec:/bin/echo foo}`
785
+	exec
786
+
787
+	#
788
+	#  The expression module doesn't do authorization,
789
+	#  authentication, or accounting.  It only does dynamic
790
+	#  translation, of the form:
791
+	#
792
+	#	Session-Timeout = `%{expr:2 + 3}`
793
+	#
794
+	#  This module needs to be instantiated, but CANNOT be
795
+	#  listed in any other section.  See 'doc/rlm_expr' for
796
+	#  more information.
797
+	#
798
+	#  rlm_expr is also responsible for registering many
799
+	#  other xlat functions such as md5, sha1 and lc.
800
+	#
801
+	#  We do not recommend removing it's listing here.
802
+	expr
803
+
804
+	#
805
+	# We add the counter module here so that it registers
806
+	# the check-name attribute before any module which sets
807
+	# it
808
+#	daily
809
+	expiration
810
+	logintime
811
+
812
+	# subsections here can be thought of as "virtual" modules.
813
+	#
814
+	# e.g. If you have two redundant SQL servers, and you want to
815
+	# use them in the authorize and accounting sections, you could
816
+	# place a "redundant" block in each section, containing the
817
+	# exact same text.  Or, you could uncomment the following
818
+	# lines, and list "redundant_sql" in the authorize and
819
+	# accounting sections.
820
+	#
821
+	#redundant redundant_sql {
822
+	#	sql1
823
+	#	sql2
824
+	#}
825
+}
826
+
827
+######################################################################
828
+#
829
+#	Policies that can be applied in multiple places are listed
830
+#	globally.  That way, they can be defined once, and referred
831
+#	to multiple times.
832
+#
833
+######################################################################
834
+$INCLUDE policy.conf
835
+
836
+######################################################################
837
+#
838
+#	Load virtual servers.
839
+#
840
+#	This next $INCLUDE line loads files in the directory that
841
+#	match the regular expression: /[a-zA-Z0-9_.]+/
842
+#
843
+#	It allows you to define new virtual servers simply by placing
844
+#	a file into the raddb/sites-enabled/ directory.
845
+#
846
+$INCLUDE sites-enabled/
847
+
848
+######################################################################
849
+#
850
+#	All of the other configuration sections like "authorize {}",
851
+#	"authenticate {}", "accounting {}", have been moved to the
852
+#	the file:
853
+#
854
+#		raddb/sites-available/default
855
+#
856
+#	This is the "default" virtual server that has the same
857
+#	configuration as in version 1.0.x and 1.1.x.  The default
858
+#	installation enables this virtual server.  You should
859
+#	edit it to create policies for your local site.
860
+#
861
+#	For more documentation on virtual servers, see:
862
+#
863
+#		raddb/sites-available/README
864
+#
865
+######################################################################

+ 23
- 0
freeradius/config/tmp/freeradius/acct_users View File

@@ -0,0 +1,23 @@
1
+#
2
+#	$Id: fafac849a0f0519cdaf7acf2ef51c8b36a5a6255 $
3
+#
4
+#	This is like the 'users' file, but it is processed only for
5
+#	accounting packets.
6
+#
7
+
8
+#  Select between different accounting methods based for example on the
9
+#  Realm, the Huntgroup-Name or any combinaison of the attribute/value
10
+#  pairs contained in an accounting packet.
11
+#
12
+#DEFAULT Realm == "foo.net", Acct-Type := sql_log.foo
13
+#
14
+#DEFAULT Huntgroup-Name == "wifi", Acct-Type := sql_log.wifi
15
+#
16
+#DEFAULT Client-IP-Address == 10.0.0.1, Acct-Type := sql_log.other
17
+#
18
+#DEFAULT Acct-Status-Type == Start, Acct-Type := sql_log.start
19
+
20
+#  Replace the User-Name with the Stripped-User-Name, if it exists.
21
+#
22
+#DEFAULT
23
+#	User-Name := "%{Stripped-User-Name:-%{User-Name}}"

+ 129
- 0
freeradius/config/tmp/freeradius/attrs View File

@@ -0,0 +1,129 @@
1
+#
2
+#	Configuration file for the rlm_attr_filter module.
3
+#	Please see rlm_attr_filter(5) manpage for more information.
4
+#
5
+#	$Id: 76c644b100656f8bd45e768b13cbcf140ce5a770 $
6
+#
7
+#	This file contains security and configuration information
8
+#	for each realm. The first field is the realm name and
9
+#	can be up to 253 characters in length. This is followed (on
10
+#	the next line) with the list of filter rules to be used to
11
+#	decide what attributes and/or values we allow proxy servers
12
+#	to pass to the NAS for this realm.
13
+#
14
+#	When a proxy-reply packet is received from a home server,
15
+#	these attributes and values are tested. Only the first match
16
+#	is used unless the "Fall-Through" variable is set to "Yes".
17
+#	In that case the rules defined in the DEFAULT case are
18
+#	processed as well.
19
+#
20
+#	A special realm named "DEFAULT" matches on all realm names.
21
+#	You can have only one DEFAULT entry. All entries are processed
22
+#	in the order they appear in this file. The first entry that
23
+#	matches the login-request will stop processing unless you use
24
+#	the Fall-Through variable.
25
+#
26
+#	Indented (with the tab character) lines following the first
27
+#	line indicate the filter rules.
28
+#
29
+#	You can include another `attrs' file with `$INCLUDE attrs.other'
30
+#
31
+
32
+#
33
+# This is a complete entry for realm "fisp". Note that there is no
34
+# Fall-Through entry so that no DEFAULT entry will be used, and the
35
+# server will NOT allow any other a/v pairs other than the ones
36
+# listed here.
37
+#
38
+# These rules allow:
39
+#     o  Only Framed-User Service-Types ( no telnet, rlogin, tcp-clear )
40
+#     o  PPP sessions ( no SLIP, CSLIP, etc. )
41
+#     o  dynamic ip assignment ( can't assign a static ip )
42
+#     o  an idle timeout value set to 600 seconds (10 min) or less
43
+#     o  a max session time set to 28800 seconds (8 hours) or less
44
+#
45
+#fisp
46
+#	Service-Type == Framed-User,
47
+#	Framed-Protocol == PPP,
48
+#	Framed-IP-Address == 255.255.255.254,
49
+#	Idle-Timeout <= 600,
50
+#	Session-Timeout <= 28800
51
+
52
+#
53
+# This is a complete entry for realm "tisp". Note that there is no
54
+# Fall-Through entry so that no DEFAULT entry will be used, and the
55
+# server will NOT allow any other a/v pairs other than the ones
56
+# listed here.
57
+#
58
+# These rules allow:
59
+#       o Only Login-User Service-Type ( no framed/ppp sessions )
60
+#       o Telnet sessions only ( no rlogin, tcp-clear )
61
+#       o Login hosts of either 192.168.1.1 or 192.168.1.2
62
+#
63
+#tisp
64
+#	Service-Type == Login-User,
65
+#	Login-Service == Telnet,
66
+#	Login-TCP-Port == 23,
67
+#	Login-IP-Host == 192.168.1.1,
68
+#	Login-IP-Host == 192.168.1.2
69
+
70
+#
71
+# The following example can be used for a home server which is only
72
+# allowed to supply a Reply-Message, a Session-Timeout attribute of
73
+# maximum 86400, a Idle-Timeout attribute of maximum 600 and a
74
+# Acct-Interim-Interval attribute between 300 and 3600.
75
+# All other attributes sent back will be filtered out.
76
+#
77
+#strictrealm
78
+#	Reply-Message =* ANY,
79
+#	Session-Timeout <= 86400,
80
+#	Idle-Timeout <= 600,
81
+#	Acct-Interim-Interval >= 300,
82
+#	Acct-Interim-Interval <= 3600
83
+
84
+#
85
+# This is a complete entry for realm "spamrealm". Fall-Through is used,
86
+# so that the DEFAULT filter rules are used in addition to these.
87
+#
88
+# These rules allow:
89
+#       o Force the application of Filter-ID attribute to be returned
90
+#         in the proxy reply, whether the proxy sent it or not.
91
+#       o The standard DEFAULT rules as defined below
92
+#
93
+#spamrealm
94
+#	Framed-Filter-Id := "nosmtp.in",
95
+#	Fall-Through = Yes
96
+
97
+#
98
+# The rest of this file contains the DEFAULT entry.
99
+# DEFAULT matches with all realm names. (except if the realm previously
100
+# matched an entry with no Fall-Through)
101
+#
102
+
103
+DEFAULT
104
+	Service-Type == Framed-User,
105
+	Service-Type == Login-User,
106
+	Login-Service == Telnet,
107
+	Login-Service == Rlogin,
108
+	Login-Service == TCP-Clear,
109
+	Login-TCP-Port <= 65536,
110
+	Framed-IP-Address == 255.255.255.254,
111
+	Framed-IP-Netmask == 255.255.255.255,
112
+	Framed-Protocol == PPP,
113
+	Framed-Protocol == SLIP,
114
+	Framed-Compression == Van-Jacobson-TCP-IP,
115
+	Framed-MTU >= 576,
116
+	Framed-Filter-ID =* ANY,
117
+	Reply-Message =* ANY,
118
+	Proxy-State =* ANY,
119
+	EAP-Message =* ANY,
120
+	Message-Authenticator =* ANY,
121
+	MS-MPPE-Recv-Key =* ANY,
122
+	MS-MPPE-Send-Key =* ANY,
123
+	MS-CHAP-MPPE-Keys =* ANY,
124
+	State =* ANY,
125
+	Session-Timeout <= 28800,
126
+	Idle-Timeout <= 600,
127
+        Calling-Station-Id =* ANY,
128
+        Operator-Name =* ANY,
129
+	Port-Limit <= 2

+ 19
- 0
freeradius/config/tmp/freeradius/attrs.access_challenge View File

@@ -0,0 +1,19 @@
1
+#
2
+#	Configuration file for the rlm_attr_filter module.
3
+#	Please see rlm_attr_filter(5) manpage for more information.
4
+#
5
+#	$Id: 78ea54e83f4a998797f16a8c564b5c2f32642adc $
6
+#
7
+#	This configuration file is used to remove almost all of the
8
+#	attributes From an Access-Challenge message.  The RFC's say
9
+#	that an Access-Challenge packet can contain only a few
10
+#	attributes.  We enforce that here.
11
+#
12
+DEFAULT
13
+	EAP-Message =* ANY,
14
+	State =* ANY,
15
+	Message-Authenticator =* ANY,
16
+	Reply-Message =* ANY,
17
+	Proxy-State =* ANY,
18
+	Session-Timeout =* ANY,
19
+	Idle-Timeout =* ANY

+ 17
- 0
freeradius/config/tmp/freeradius/attrs.access_reject View File

@@ -0,0 +1,17 @@
1
+#
2
+#	Configuration file for the rlm_attr_filter module.
3
+#	Please see rlm_attr_filter(5) manpage for more information.
4
+#
5
+#	$Id: e263d504cfdc5cf5db00fa6aacf2bd148a7623fc $
6
+#
7
+#	This configuration file is used to remove almost all of the attributes
8
+#	From an Access-Reject message.  The RFC's say that an Access-Reject
9
+#	packet can contain only a few attributes.  We enforce that here.
10
+#
11
+DEFAULT
12
+	EAP-Message =* ANY,
13
+	State =* ANY,
14
+	Message-Authenticator =* ANY,
15
+	Reply-Message =* ANY,
16
+	MS-CHAP-Error =* ANY,
17
+	Proxy-State =* ANY

+ 15
- 0
freeradius/config/tmp/freeradius/attrs.accounting_response View File

@@ -0,0 +1,15 @@
1
+#
2
+#	Configuration file for the rlm_attr_filter module.
3
+#	Please see rlm_attr_filter(5) manpage for more information.
4
+#
5
+#	$Id: 3746ce4da3d58fcdd0b777a93e599045353c27ac $
6
+#
7
+#	This configuration file is used to remove almost all of the attributes
8
+#	From an Accounting-Response message.  The RFC's say that an
9
+#	Accounting-Response packet can contain only a few attributes.
10
+#	We enforce that here.
11
+#
12
+DEFAULT
13
+	Vendor-Specific =* ANY,
14
+	Message-Authenticator =* ANY,
15
+	Proxy-State =* ANY

+ 62
- 0
freeradius/config/tmp/freeradius/attrs.pre-proxy View File

@@ -0,0 +1,62 @@
1
+#
2
+#	Configuration file for the rlm_attr_filter module.
3
+#	Please see rlm_attr_filter(5) manpage for more information.
4
+#
5
+#	$Id: 8c601cf205f9d85b75c1ec7fc8e816e7341a5ba4 $
6
+#
7
+#	This file contains security and configuration information
8
+#	for each realm. It can be used be an rlm_attr_filter module
9
+#	instance to filter attributes before sending packets to the
10
+#	home server of a realm.
11
+#
12
+#	When a packet is sent to a home server, these attributes
13
+#	and values are tested. Only the first match is used unless
14
+#	the "Fall-Through" variable is set to "Yes". In that case
15
+#	the rules defined in the DEFAULT case are processed as well.
16
+#
17
+#	A special realm named "DEFAULT" matches on all realm names.
18
+#	You can have only one DEFAULT entry. All entries are processed
19
+#	in the order they appear in this file. The first entry that
20
+#	matches the login-request will stop processing unless you use
21
+#	the Fall-Through variable.
22
+#
23
+#	The first line indicates the realm to which the rules apply.
24
+#	Indented (with the tab character) lines following the first
25
+#	line indicate the filter rules.
26
+#
27
+
28
+# This is a complete entry for 'nochap' realm. It allows to send very
29
+# basic attributes to the home server. Note that there is no Fall-Through
30
+# entry so that no DEFAULT entry will be used. Only the listed attributes
31
+# will be sent in the packet, all other attributes will be filtered out.
32
+#
33
+#nochap
34
+#	User-Name =* ANY,
35
+#	User-Password =* ANY,
36
+#	NAS-Ip-Address =* ANY,
37
+#	NAS-Identifier =* ANY
38
+
39
+# The entry for the 'brokenas' realm removes the attribute NAS-Port-Type
40
+# if its value is different from 'Ethernet'. Then the default rules are
41
+# applied.
42
+#
43
+#brokenas
44
+#	NAS-Port-Type == Ethernet
45
+#	Fall-Through = Yes
46
+
47
+# The rest of this file contains the DEFAULT entry.
48
+# DEFAULT matches with all realm names.
49
+
50
+DEFAULT
51
+	User-Name =* ANY,
52
+	User-Password =* ANY,
53
+	CHAP-Password =* ANY,
54
+	CHAP-Challenge =* ANY,
55
+	MS-CHAP-Challenge =* ANY,
56
+	MS-CHAP-Response =* ANY,
57
+	EAP-Message =* ANY,
58
+	Message-Authenticator =* ANY,
59
+	State =* ANY,
60
+	NAS-IP-Address =* ANY,
61
+	NAS-Identifier =* ANY,
62
+	Proxy-State =* ANY

+ 241
- 0
freeradius/config/tmp/freeradius/clients.conf View File

@@ -0,0 +1,241 @@
1
+# -*- text -*-
2
+##
3
+## clients.conf -- client configuration directives
4
+##
5
+##  $Id: 729c15d3e84c6cdb54a5f3652d93a2d7f8725fd4 $
6
+
7
+#######################################################################
8
+#
9
+#  Define RADIUS clients (usually a NAS, Access Point, etc.).
10
+
11
+#
12
+#  Defines a RADIUS client.
13
+#
14
+#  '127.0.0.1' is another name for 'localhost'.  It is enabled by default,
15
+#  to allow testing of the server after an initial installation.  If you
16
+#  are not going to be permitting RADIUS queries from localhost, we suggest
17
+#  that you delete, or comment out, this entry.
18
+#
19
+#
20
+
21
+#
22
+#  Each client has a "short name" that is used to distinguish it from
23
+#  other clients.
24
+#
25
+#  In version 1.x, the string after the word "client" was the IP
26
+#  address of the client.  In 2.0, the IP address is configured via
27
+#  the "ipaddr" or "ipv6addr" fields.  For compatibility, the 1.x
28
+#  format is still accepted.
29
+#
30
+client localhost {
31
+  #  Allowed values are:
32
+  # dotted quad (1.2.3.4)
33
+  #       hostname    (radius.example.com)
34
+  ipaddr = 127.0.0.1
35
+
36
+  #  OR, you can use an IPv6 address, but not both
37
+  #  at the same time.
38
+# ipv6addr = :: # any.  ::1 == localhost
39
+
40
+  #
41
+  #  A note on DNS:  We STRONGLY recommend using IP addresses
42
+  #  rather than host names.  Using host names means that the
43
+  #  server will do DNS lookups when it starts, making it
44
+  #  dependent on DNS.  i.e. If anything goes wrong with DNS,
45
+  #  the server won't start!
46
+  #
47
+  #  The server also looks up the IP address from DNS once, and
48
+  #  only once, when it starts.  If the DNS record is later
49
+  #  updated, the server WILL NOT see that update.
50
+  #
51
+
52
+  #  One client definition can be applied to an entire network.
53
+  #  e.g. 127/8 should be defined with "ipaddr = 127.0.0.0" and
54
+  #  "netmask = 8"
55
+  #
56
+  #  If not specified, the default netmask is 32 (i.e. /32)
57
+  #
58
+  #  We do NOT recommend using anything other than 32.  There
59
+  #  are usually other, better ways to achieve the same goal.
60
+  #  Using netmasks of other than 32 can cause security issues.
61
+  #
62
+  #  You can specify overlapping networks (127/8 and 127.0/16)
63
+  #  In that case, the smallest possible network will be used
64
+  #  as the "best match" for the client.
65
+  #
66
+  #  Clients can also be defined dynamically at run time, based
67
+  #  on any criteria.  e.g. SQL lookups, keying off of NAS-Identifier,
68
+  #  etc.
69
+  #  See raddb/sites-available/dynamic-clients for details.
70
+  #
71
+
72
+# netmask = 32
73
+
74
+  #
75
+  #  The shared secret use to "encrypt" and "sign" packets between
76
+  #  the NAS and FreeRADIUS.  You MUST change this secret from the
77
+  #  default, otherwise it's not a secret any more!
78
+  #
79
+  #  The secret can be any string, up to 8k characters in length.
80
+  #
81
+  #  Control codes can be entered vi octal encoding,
82
+  # e.g. "\101\102" == "AB"
83
+  #  Quotation marks can be entered by escaping them,
84
+  # e.g. "foo\"bar"
85
+  #
86
+  #  A note on security:  The security of the RADIUS protocol
87
+  #  depends COMPLETELY on this secret!  We recommend using a
88
+  #  shared secret that is composed of:
89
+  #
90
+  # upper case letters
91
+  # lower case letters
92
+  # numbers
93
+  #
94
+  #  And is at LEAST 8 characters long, preferably 16 characters in
95
+  #  length.  The secret MUST be random, and should not be words,
96
+  #  phrase, or anything else that is recognizable.
97
+  #
98
+  #  The default secret below is only for testing, and should
99
+  #  not be used in any real environment.
100
+  #
101
+  secret    = toor42
102
+
103
+  #
104
+  #  Old-style clients do not send a Message-Authenticator
105
+  #  in an Access-Request.  RFC 5080 suggests that all clients
106
+  #  SHOULD include it in an Access-Request.  The configuration
107
+  #  item below allows the server to require it.  If a client
108
+  #  is required to include a Message-Authenticator and it does
109
+  #  not, then the packet will be silently discarded.
110
+  #
111
+  #  allowed values: yes, no
112
+  require_message_authenticator = no
113
+
114
+  #
115
+  #  The short name is used as an alias for the fully qualified
116
+  #  domain name, or the IP address.
117
+  #
118
+  #  It is accepted for compatibility with 1.x, but it is no
119
+  #  longer necessary in 2.0
120
+  #
121
+# shortname = localhost
122
+
123
+  #
124
+  # the following three fields are optional, but may be used by
125
+  # checkrad.pl for simultaneous use checks
126
+  #
127
+
128
+  #
129
+  # The nastype tells 'checkrad.pl' which NAS-specific method to
130
+  #  use to query the NAS for simultaneous use.
131
+  #
132
+  #  Permitted NAS types are:
133
+  #
134
+  # cisco
135
+  # computone
136
+  # livingston
137
+  # juniper
138
+  # max40xx
139
+  # multitech
140
+  # netserver
141
+  # pathras
142
+  # patton
143
+  # portslave
144
+  # tc
145
+  # usrhiper
146
+  # other   # for all other types
147
+
148
+  #
149
+  nastype     = other # localhost isn't usually a NAS...
150
+
151
+  #
152
+  #  The following two configurations are for future use.
153
+  #  The 'naspasswd' file is currently used to store the NAS
154
+  #  login name and password, which is used by checkrad.pl
155
+  #  when querying the NAS for simultaneous use.
156
+  #
157
+# login       = !root
158
+# password    = someadminpas
159
+
160
+  #
161
+  #  As of 2.0, clients can also be tied to a virtual server.
162
+  #  This is done by setting the "virtual_server" configuration
163
+  #  item, as in the example below.
164
+  #
165
+# virtual_server = home1
166
+
167
+  #
168
+  #  A pointer to the "home_server_pool" OR a "home_server"
169
+  #  section that contains the CoA configuration for this
170
+  #  client.  For an example of a coa home server or pool,
171
+  #  see raddb/sites-available/originate-coa
172
+# coa_server = coa
173
+}
174
+
175
+# IPv6 Client
176
+#client ::1 {
177
+# secret    = testing123
178
+# shortname = localhost
179
+#}
180
+#
181
+# All IPv6 Site-local clients
182
+#client fe80::/16 {
183
+# secret    = testing123
184
+# shortname = localhost
185
+#}
186
+
187
+#client some.host.org {
188
+# secret    = testing123
189
+# shortname = localhost
190
+#}
191
+
192
+#
193
+#  You can now specify one secret for a network of clients.
194
+#  When a client request comes in, the BEST match is chosen.
195
+#  i.e. The entry from the smallest possible network.
196
+#
197
+#client 192.168.0.0/24 {
198
+# secret    = testing123-1
199
+# shortname = private-network-1
200
+#}
201
+#
202
+#client 192.168.0.0/16 {
203
+# secret    = testing123-2
204
+# shortname = private-network-2
205
+#}
206
+
207
+
208
+#client 10.10.10.10 {
209
+# # secret and password are mapped through the "secrets" file.
210
+# secret      = testing123
211
+# shortname   = liv1
212
+#       # the following three fields are optional, but may be used by
213
+#       # checkrad.pl for simultaneous usage checks
214
+# nastype     = livingston
215
+# login       = !root
216
+# password    = someadminpas
217
+#}
218
+
219
+#######################################################################
220
+#
221
+#  Per-socket client lists.  The configuration entries are exactly
222
+#  the same as above, but they are nested inside of a section.
223
+#
224
+#  You can have as many per-socket client lists as you have "listen"
225
+#  sections, or you can re-use a list among multiple "listen" sections.
226
+#
227
+#  Un-comment this section, and edit a "listen" section to add:
228
+#  "clients = per_socket_clients".  That IP address/port combination
229
+#  will then accept ONLY the clients listed in this section.
230
+#
231
+#clients per_socket_clients {
232
+# client 192.168.3.4 {
233
+#   secret = testing123
234
+#        }
235
+#}
236
+
237
+client router {
238
+  ipaddr = 0.0.0.0
239
+  netmask = 0
240
+  secret = toor42
241
+}

+ 32
- 0
freeradius/config/tmp/freeradius/dictionary View File

@@ -0,0 +1,32 @@
1
+#
2
+#	This is the master dictionary file, which references the
3
+#	pre-defined dictionary files included with the server.
4
+#
5
+#	Any new/changed attributes MUST be placed in this file, as
6
+#	the pre-defined dictionaries SHOULD NOT be edited.
7
+#
8
+#	$Id: ceb31c82feb869972588f60fe6ace2fc1db70224 $
9
+#
10
+
11
+#
12
+#	The filename given here should be an absolute path. 
13
+#
14
+$INCLUDE	/usr/share/freeradius/dictionary
15
+
16
+#
17
+#	Place additional attributes or $INCLUDEs here.  They will
18
+#	over-ride the definitions in the pre-defined dictionaries.
19
+#
20
+#	See the 'man' page for 'dictionary' for information on
21
+#	the format of the dictionary files.
22
+
23
+#
24
+#	If you want to add entries to the dictionary file,
25
+#	which are NOT going to be placed in a RADIUS packet,
26
+#	add them here.  The numbers you pick should be between
27
+#	3000 and 4000.
28
+#
29
+
30
+#ATTRIBUTE	My-Local-String		3000	string
31
+#ATTRIBUTE	My-Local-IPAddr		3001	ipaddr
32
+#ATTRIBUTE	My-Local-Integer	3002	integer

+ 688
- 0
freeradius/config/tmp/freeradius/eap.conf View File

@@ -0,0 +1,688 @@
1
+# -*- text -*-
2
+##
3
+##  eap.conf -- Configuration for EAP types (PEAP, TTLS, etc.)
4
+##
5
+##  $Id: 95bebe4d25ef13871fb201ba540ed008078dab07 $
6
+
7
+#######################################################################
8
+#
9
+#  Whatever you do, do NOT set 'Auth-Type := EAP'.  The server
10
+#  is smart enough to figure this out on its own.  The most
11
+#  common side effect of setting 'Auth-Type := EAP' is that the
12
+#  users then cannot use ANY other authentication method.
13
+#
14
+#  EAP types NOT listed here may be supported via the "eap2" module.
15
+#  See experimental.conf for documentation.
16
+#
17
+  eap {
18
+    #  Invoke the default supported EAP type when
19
+    #  EAP-Identity response is received.
20
+    #
21
+    #  The incoming EAP messages DO NOT specify which EAP
22
+    #  type they will be using, so it MUST be set here.
23
+    #
24
+    #  For now, only one default EAP type may be used at a time.
25
+    #
26
+    #  If the EAP-Type attribute is set by another module,
27
+    #  then that EAP type takes precedence over the
28
+    #  default type configured here.
29
+    #
30
+    default_eap_type = peap
31
+
32
+    #  A list is maintained to correlate EAP-Response
33
+    #  packets with EAP-Request packets.  After a
34
+    #  configurable length of time, entries in the list
35
+    #  expire, and are deleted.
36
+    #
37
+    timer_expire     = 60
38
+
39
+    #  There are many EAP types, but the server has support
40
+    #  for only a limited subset.  If the server receives
41
+    #  a request for an EAP type it does not support, then
42
+    #  it normally rejects the request.  By setting this
43
+    #  configuration to "yes", you can tell the server to
44
+    #  instead keep processing the request.  Another module
45
+    #  MUST then be configured to proxy the request to
46
+    #  another RADIUS server which supports that EAP type.
47
+    #
48
+    #  If another module is NOT configured to handle the
49
+    #  request, then the request will still end up being
50
+    #  rejected.
51
+    ignore_unknown_eap_types = no
52
+
53
+    # Cisco AP1230B firmware 12.2(13)JA1 has a bug.  When given
54
+    # a User-Name attribute in an Access-Accept, it copies one
55
+    # more byte than it should.
56
+    #
57
+    # We can work around it by configurably adding an extra
58
+    # zero byte.
59
+    cisco_accounting_username_bug = no
60
+
61
+    #
62
+    #  Help prevent DoS attacks by limiting the number of
63
+    #  sessions that the server is tracking.  For simplicity,
64
+    #  this is taken from the "max_requests" directive in
65
+    #  radiusd.conf.
66
+    max_sessions = ${max_requests}
67
+
68
+    # Supported EAP-types
69
+
70
+    #
71
+    #  We do NOT recommend using EAP-MD5 authentication
72
+    #  for wireless connections.  It is insecure, and does
73
+    #  not provide for dynamic WEP keys.
74
+    #
75
+    md5 {
76
+    }
77
+
78
+    # Cisco LEAP
79
+    #
80
+    #  We do not recommend using LEAP in new deployments.  See:
81
+    #  http://www.securiteam.com/tools/5TP012ACKE.html
82
+    #
83
+    #  Cisco LEAP uses the MS-CHAP algorithm (but not
84
+    #  the MS-CHAP attributes) to perform it's authentication.
85
+    #
86
+    #  As a result, LEAP *requires* access to the plain-text
87
+    #  User-Password, or the NT-Password attributes.
88
+    #  'System' authentication is impossible with LEAP.
89
+    #
90
+    leap {
91
+    }
92
+
93
+    #  Generic Token Card.
94
+    #
95
+    #  Currently, this is only permitted inside of EAP-TTLS,
96
+    #  or EAP-PEAP.  The module "challenges" the user with
97
+    #  text, and the response from the user is taken to be
98
+    #  the User-Password.
99
+    #
100
+    #  Proxying the tunneled EAP-GTC session is a bad idea,
101
+    #  the users password will go over the wire in plain-text,
102
+    #  for anyone to see.
103
+    #
104
+    gtc {
105
+      #  The default challenge, which many clients
106
+      #  ignore..
107
+      #challenge = "Password: "
108
+
109
+      #  The plain-text response which comes back
110
+      #  is put into a User-Password attribute,
111
+      #  and passed to another module for
112
+      #  authentication.  This allows the EAP-GTC
113
+      #  response to be checked against plain-text,
114
+      #  or crypt'd passwords.
115
+      #
116
+      #  If you say "Local" instead of "PAP", then
117
+      #  the module will look for a User-Password
118
+      #  configured for the request, and do the
119
+      #  authentication itself.
120
+      #
121
+      auth_type = PAP
122
+    }
123
+
124
+    ## EAP-TLS
125
+    #
126
+    #  See raddb/certs/README for additional comments
127
+    #  on certificates.
128
+    #
129
+    #  If OpenSSL was not found at the time the server was
130
+    #  built, the "tls", "ttls", and "peap" sections will
131
+    #  be ignored.
132
+    #
133
+    #  Otherwise, when the server first starts in debugging
134
+    #  mode, test certificates will be created.  See the
135
+    #  "make_cert_command" below for details, and the README
136
+    #  file in raddb/certs
137
+    #
138
+    #  These test certificates SHOULD NOT be used in a normal
139
+    #  deployment.  They are created only to make it easier
140
+    #  to install the server, and to perform some simple
141
+    #  tests with EAP-TLS, TTLS, or PEAP.
142
+    #
143
+    #  See also:
144
+    #
145
+    #  http://www.dslreports.com/forum/remark,9286052~mode=flat
146
+    #
147
+    #  Note that you should NOT use a globally known CA here!
148
+    #  e.g. using a Verisign cert as a "known CA" means that
149
+    #  ANYONE who has a certificate signed by them can
150
+    #  authenticate via EAP-TLS!  This is likely not what you want.
151
+    tls {
152
+      #
153
+      #  These is used to simplify later configurations.
154
+      #
155
+      certdir = ${confdir}/certs
156
+      cadir = ${confdir}/certs
157
+
158
+      private_key_password = whatever
159
+      private_key_file = ${certdir}/server.key
160
+
161
+      #  If Private key & Certificate are located in
162
+      #  the same file, then private_key_file &
163
+      #  certificate_file must contain the same file
164
+      #  name.
165
+      #
166
+      #  If CA_file (below) is not used, then the
167
+      #  certificate_file below MUST include not
168
+      #  only the server certificate, but ALSO all
169
+      #  of the CA certificates used to sign the
170
+      #  server certificate.
171
+      certificate_file = ${certdir}/server.pem
172
+
173
+      #  Trusted Root CA list
174
+      #
175
+      #  ALL of the CA's in this list will be trusted
176
+      #  to issue client certificates for authentication.
177
+      #
178
+      #  In general, you should use self-signed
179
+      #  certificates for 802.1x (EAP) authentication.
180
+      #  In that case, this CA file should contain
181
+      #  *one* CA certificate.
182
+      #
183
+      #  This parameter is used only for EAP-TLS,
184
+      #  when you issue client certificates.  If you do
185
+      #  not use client certificates, and you do not want
186
+      #  to permit EAP-TLS authentication, then delete
187
+      #  this configuration item.
188
+      CA_file = ${cadir}/ca.pem
189
+
190
+      #
191
+      #  For DH cipher suites to work, you have to
192
+      #  run OpenSSL to create the DH file first:
193
+      #
194
+      #   openssl dhparam -out certs/dh 1024
195
+      #
196
+      dh_file = ${certdir}/dh
197
+      random_file = /dev/urandom
198
+
199
+
200
+      #
201
+      #  This can never exceed the size of a RADIUS
202
+      #  packet (4096 bytes), and is preferably half
203
+      #  that, to accomodate other attributes in
204
+      #  RADIUS packet.  On most APs the MAX packet
205
+      #  length is configured between 1500 - 1600
206
+      #  In these cases, fragment size should be
207
+      #  1024 or less.
208
+      #
209
+    # fragment_size = 1024
210
+
211
+      #  include_length is a flag which is
212
+      #  by default set to yes If set to
213
+      #  yes, Total Length of the message is
214
+      #  included in EVERY packet we send.
215
+      #  If set to no, Total Length of the
216
+      #  message is included ONLY in the
217
+      #  First packet of a fragment series.
218
+      #
219
+    # include_length = yes
220
+
221
+      #  Check the Certificate Revocation List
222
+      #
223
+      #  1) Copy CA certificates and CRLs to same directory.
224
+      #  2) Execute 'c_rehash <CA certs&CRLs Directory>'.
225
+      #    'c_rehash' is OpenSSL's command.
226
+      #  3) uncomment the line below.
227
+      #  5) Restart radiusd
228
+    # check_crl = yes
229
+      CA_path = ${cadir}
230
+
231
+           #
232
+           #  If check_cert_issuer is set, the value will
233
+           #  be checked against the DN of the issuer in
234
+           #  the client certificate.  If the values do not
235
+           #  match, the cerficate verification will fail,
236
+           #  rejecting the user.
237
+           #
238
+           #  In 2.1.10 and later, this check can be done
239
+           #  more generally by checking the value of the
240
+           #  TLS-Client-Cert-Issuer attribute.  This check
241
+           #  can be done via any mechanism you choose.
242
+           #
243
+    #       check_cert_issuer = "/C=GB/ST=Berkshire/L=Newbury/O=My Company Ltd"
244
+
245
+           #
246
+           #  If check_cert_cn is set, the value will
247
+           #  be xlat'ed and checked against the CN
248
+           #  in the client certificate.  If the values
249
+           #  do not match, the certificate verification
250
+           #  will fail rejecting the user.
251
+           #
252
+           #  This check is done only if the previous
253
+           #  "check_cert_issuer" is not set, or if
254
+           #  the check succeeds.
255
+           #
256
+           #  In 2.1.10 and later, this check can be done
257
+           #  more generally by checking the value of the
258
+           #  TLS-Client-Cert-CN attribute.  This check
259
+           #  can be done via any mechanism you choose.
260
+           #
261
+    # check_cert_cn = %{User-Name}
262
+    #
263
+      # Set this option to specify the allowed
264
+      # TLS cipher suites.  The format is listed
265
+      # in "man 1 ciphers".
266
+      cipher_list = "DEFAULT"
267
+
268
+      #
269
+      # As part of checking a client certificate, the EAP-TLS
270
+      # sets some attributes such as TLS-Client-Cert-CN. This
271
+      # virtual server has access to these attributes, and can
272
+      # be used to accept or reject the request.
273
+      #
274
+    # virtual_server = check-eap-tls
275
+
276
+      # This command creates the initial "snake oil"
277
+      # certificates when the server is run as root,
278
+      # and via "radiusd -X".
279
+      #
280
+      # As of 2.1.11, it *also* checks the server
281
+      # certificate for validity, including expiration.
282
+      # This means that radiusd will refuse to start
283
+      # when the certificate has expired.  The alternative
284
+      # is to have the 802.1X clients refuse to connect
285
+      # when they discover the certificate has expired.
286
+      #
287
+      # Debugging client issues is hard, so it's better
288
+      # for the server to print out an error message,
289
+      # and refuse to start.
290
+      #
291
+      make_cert_command = "${certdir}/bootstrap"
292
+
293
+      #
294
+      #  Elliptical cryptography configuration
295
+      #
296
+      #  Only for OpenSSL >= 0.9.8.f
297
+      #
298
+      ecdh_curve = "prime256v1"
299
+
300
+      #
301
+      #  Session resumption / fast reauthentication
302
+      #  cache.
303
+      #
304
+      #  The cache contains the following information:
305
+      #
306
+      #  session Id - unique identifier, managed by SSL
307
+      #  User-Name  - from the Access-Accept
308
+      #  Stripped-User-Name - from the Access-Request
309
+      #  Cached-Session-Policy - from the Access-Accept
310
+      #
311
+      #  The "Cached-Session-Policy" is the name of a
312
+      #  policy which should be applied to the cached
313
+      #  session.  This policy can be used to assign
314
+      #  VLANs, IP addresses, etc.  It serves as a useful
315
+      #  way to re-apply the policy from the original
316
+      #  Access-Accept to the subsequent Access-Accept
317
+      #  for the cached session.
318
+      #
319
+      #  On session resumption, these attributes are
320
+      #  copied from the cache, and placed into the
321
+      #  reply list.
322
+      #
323
+      #  You probably also want "use_tunneled_reply = yes"
324
+      #  when using fast session resumption.
325
+      #
326
+      cache {
327
+            #
328
+            #  Enable it.  The default is "no".
329
+            #  Deleting the entire "cache" subsection
330
+            #  Also disables caching.
331
+            #
332
+            #  You can disallow resumption for a
333
+            #  particular user by adding the following
334
+            #  attribute to the control item list:
335
+            #
336
+            #   Allow-Session-Resumption = No
337
+            #
338
+            #  If "enable = no" below, you CANNOT
339
+            #  enable resumption for just one user
340
+            #  by setting the above attribute to "yes".
341
+            #
342
+            enable = no
343
+
344
+            #
345
+            #  Lifetime of the cached entries, in hours.
346
+            #  The sessions will be deleted after this
347
+            #  time.
348
+            #
349
+            lifetime = 24 # hours
350
+
351
+            #
352
+            #  The maximum number of entries in the
353
+            #  cache.  Set to "0" for "infinite".
354
+            #
355
+            #  This could be set to the number of users
356
+            #  who are logged in... which can be a LOT.
357
+            #
358
+            max_entries = 255
359
+      }
360
+
361
+      #
362
+      #  As of version 2.1.10, client certificates can be
363
+      #  validated via an external command.  This allows
364
+      #  dynamic CRLs or OCSP to be used.
365
+      #
366
+      #  This configuration is commented out in the
367
+      #  default configuration.  Uncomment it, and configure
368
+      #  the correct paths below to enable it.
369
+      #
370
+      verify {
371
+        #  A temporary directory where the client
372
+        #  certificates are stored.  This directory
373
+        #  MUST be owned by the UID of the server,
374
+        #  and MUST not be accessible by any other
375
+        #  users.  When the server starts, it will do
376
+        #  "chmod go-rwx" on the directory, for
377
+        #  security reasons.  The directory MUST
378
+        #  exist when the server starts.
379
+        #
380
+        #  You should also delete all of the files
381
+        #  in the directory when the server starts.
382
+    #         tmpdir = /tmp/radiusd
383
+
384
+        #  The command used to verify the client cert.
385
+        #  We recommend using the OpenSSL command-line
386
+        #  tool.
387
+        #
388
+        #  The ${..CA_path} text is a reference to
389
+        #  the CA_path variable defined above.
390
+        #
391
+        #  The %{TLS-Client-Cert-Filename} is the name
392
+        #  of the temporary file containing the cert
393
+        #  in PEM format.  This file is automatically
394
+        #  deleted by the server when the command
395
+        #  returns.
396
+    #       client = "/path/to/openssl verify -CApath ${..CA_path} %{TLS-Client-Cert-Filename}"
397
+      }
398
+
399
+      #
400
+      #  OCSP Configuration
401
+      #  Certificates can be verified against an OCSP
402
+      #  Responder. This makes it possible to immediately
403
+      #  revoke certificates without the distribution of
404
+      #  new Certificate Revokation Lists (CRLs).
405
+      #
406
+      ocsp {
407
+            #
408
+            #  Enable it.  The default is "no".
409
+            #  Deleting the entire "ocsp" subsection
410
+            #  Also disables ocsp checking
411
+            #
412
+            enable = no
413
+
414
+            #
415
+            #  The OCSP Responder URL can be automatically
416
+            #  extracted from the certificate in question.
417
+            #  To override the OCSP Responder URL set
418
+            #  "override_cert_url = yes". 
419
+            #
420
+            override_cert_url = yes
421
+
422
+            #
423
+            #  If the OCSP Responder address is not
424
+            #  extracted from the certificate, the
425
+            #  URL can be defined here.
426
+
427
+            #
428
+            #  Limitation: Currently the HTTP
429
+            #  Request is not sending the "Host: "
430
+            #  information to the web-server.  This
431
+            #  can be a problem if the OCSP
432
+            #  Responder is running as a vhost.
433
+            #
434
+            url = "http://127.0.0.1/ocsp/"
435
+
436
+            #
437
+            # If the OCSP Responder can not cope with nonce
438
+            # in the request, then it can be disabled here.
439
+            #
440
+            # For security reasons, disabling this option
441
+            # is not recommended as nonce protects against
442
+            # replay attacks.
443
+            #
444
+            # Note that Microsoft AD Certificate Services OCSP
445
+            # Responder does not enable nonce by default. It is
446
+            # more secure to enable nonce on the responder than
447
+            # to disable it in the query here.
448
+            # See http://technet.microsoft.com/en-us/library/cc770413%28WS.10%29.aspx
449
+            #
450
+            # use_nonce = yes
451
+
452
+            #
453
+            # Number of seconds before giving up waiting
454
+            # for OCSP response. 0 uses system default.
455
+            #
456
+            # timeout = 0
457
+
458
+            #
459
+            # Normally an error in querying the OCSP
460
+            # responder (no response from server, server did
461
+            # not understand the request, etc) will result in
462
+            # a validation failure.
463
+            #
464
+            # To treat these errors as 'soft' failures and
465
+            # still accept the certificate, enable this
466
+            # option.
467
+            # 
468
+            # Warning: this may enable clients with revoked
469
+            # certificates to connect if the OCSP responder
470
+            # is not available. Use with caution.
471
+            #
472
+            # softfail = no
473
+      }
474
+    }
475
+
476
+    #  The TTLS module implements the EAP-TTLS protocol,
477
+    #  which can be described as EAP inside of Diameter,
478
+    #  inside of TLS, inside of EAP, inside of RADIUS...
479
+    #
480
+    #  Surprisingly, it works quite well.
481
+    #
482
+    #  The TTLS module needs the TLS module to be installed
483
+    #  and configured, in order to use the TLS tunnel
484
+    #  inside of the EAP packet.  You will still need to
485
+    #  configure the TLS module, even if you do not want
486
+    #  to deploy EAP-TLS in your network.  Users will not
487
+    #  be able to request EAP-TLS, as it requires them to
488
+    #  have a client certificate.  EAP-TTLS does not
489
+    #  require a client certificate.
490
+    #
491
+    #  You can make TTLS require a client cert by setting
492
+    #
493
+    # EAP-TLS-Require-Client-Cert = Yes
494
+    #
495
+    #  in the control items for a request.
496
+    #
497
+    ttls {
498
+      #  The tunneled EAP session needs a default
499
+      #  EAP type which is separate from the one for
500
+      #  the non-tunneled EAP module.  Inside of the
501
+      #  TTLS tunnel, we recommend using EAP-MD5.
502
+      #  If the request does not contain an EAP
503
+      #  conversation, then this configuration entry
504
+      #  is ignored.
505
+      default_eap_type = md5
506
+
507
+      #  The tunneled authentication request does
508
+      #  not usually contain useful attributes
509
+      #  like 'Calling-Station-Id', etc.  These
510
+      #  attributes are outside of the tunnel,
511
+      #  and normally unavailable to the tunneled
512
+      #  authentication request.
513
+      #
514
+      #  By setting this configuration entry to
515
+      #  'yes', any attribute which NOT in the
516
+      #  tunneled authentication request, but
517
+      #  which IS available outside of the tunnel,
518
+      #  is copied to the tunneled request.
519
+      #
520
+      # allowed values: {no, yes}
521
+      copy_request_to_tunnel = no
522
+
523
+      #  The reply attributes sent to the NAS are
524
+      #  usually based on the name of the user
525
+      #  'outside' of the tunnel (usually
526
+      #  'anonymous').  If you want to send the
527
+      #  reply attributes based on the user name
528
+      #  inside of the tunnel, then set this
529
+      #  configuration entry to 'yes', and the reply
530
+      #  to the NAS will be taken from the reply to
531
+      #  the tunneled request.
532
+      #
533
+      # allowed values: {no, yes}
534
+      use_tunneled_reply = no
535
+
536
+      #
537
+      #  The inner tunneled request can be sent
538
+      #  through a virtual server constructed
539
+      #  specifically for this purpose.
540
+      #
541
+      #  If this entry is commented out, the inner
542
+      #  tunneled request will be sent through
543
+      #  the virtual server that processed the
544
+      #  outer requests.
545
+      #
546
+      virtual_server = "inner-tunnel"
547
+
548
+      #  This has the same meaning as the
549
+      #  same field in the "tls" module, above.
550
+      #  The default value here is "yes".
551
+    # include_length = yes
552
+    }
553
+
554
+    ##################################################
555
+    #
556
+    #  !!!!! WARNINGS for Windows compatibility  !!!!!
557
+    #
558
+    ##################################################
559
+    #
560
+    #  If you see the server send an Access-Challenge,
561
+    #  and the client never sends another Access-Request,
562
+    #  then
563
+    #
564
+    #   STOP!
565
+    #
566
+    #  The server certificate has to have special OID's
567
+    #  in it, or else the Microsoft clients will silently
568
+    #  fail.  See the "scripts/xpextensions" file for
569
+    #  details, and the following page:
570
+    #
571
+    # http://support.microsoft.com/kb/814394/en-us
572
+    #
573
+    #  For additional Windows XP SP2 issues, see:
574
+    #
575
+    # http://support.microsoft.com/kb/885453/en-us
576
+    #
577
+    #
578
+    #  If is still doesn't work, and you're using Samba,
579
+    #  you may be encountering a Samba bug.  See:
580
+    #
581
+    # https://bugzilla.samba.org/show_bug.cgi?id=6563
582
+    #
583
+    #  Note that we do not necessarily agree with their
584
+    #  explanation... but the fix does appear to work.
585
+    #
586
+    ##################################################
587
+
588
+    #
589
+    #  The tunneled EAP session needs a default EAP type
590
+    #  which is separate from the one for the non-tunneled
591
+    #  EAP module.  Inside of the TLS/PEAP tunnel, we
592
+    #  recommend using EAP-MS-CHAPv2.
593
+    #
594
+    #  The PEAP module needs the TLS module to be installed
595
+    #  and configured, in order to use the TLS tunnel
596
+    #  inside of the EAP packet.  You will still need to
597
+    #  configure the TLS module, even if you do not want
598
+    #  to deploy EAP-TLS in your network.  Users will not
599
+    #  be able to request EAP-TLS, as it requires them to
600
+    #  have a client certificate.  EAP-PEAP does not
601
+    #  require a client certificate.
602
+    #
603
+    #
604
+    #  You can make PEAP require a client cert by setting
605
+    #
606
+    # EAP-TLS-Require-Client-Cert = Yes
607
+    #
608
+    #  in the control items for a request.
609
+    #
610
+    peap {
611
+      #  The tunneled EAP session needs a default
612
+      #  EAP type which is separate from the one for
613
+      #  the non-tunneled EAP module.  Inside of the
614
+      #  PEAP tunnel, we recommend using MS-CHAPv2,
615
+      #  as that is the default type supported by
616
+      #  Windows clients.
617
+      default_eap_type = mschapv2
618
+
619
+      #  the PEAP module also has these configuration
620
+      #  items, which are the same as for TTLS.
621
+      copy_request_to_tunnel = no
622
+      use_tunneled_reply = no
623
+
624
+      #  When the tunneled session is proxied, the
625
+      #  home server may not understand EAP-MSCHAP-V2.
626
+      #  Set this entry to "no" to proxy the tunneled
627
+      #  EAP-MSCHAP-V2 as normal MSCHAPv2.
628
+    # proxy_tunneled_request_as_eap = yes
629
+
630
+      #
631
+      #  The inner tunneled request can be sent
632
+      #  through a virtual server constructed
633
+      #  specifically for this purpose.
634
+      #
635
+      #  If this entry is commented out, the inner
636
+      #  tunneled request will be sent through
637
+      #  the virtual server that processed the
638
+      #  outer requests.
639
+      #
640
+      virtual_server = "inner-tunnel"
641
+
642
+      # This option enables support for MS-SoH
643
+      # see doc/SoH.txt for more info.
644
+      # It is disabled by default.
645
+      #
646
+#     soh = yes
647
+
648
+      #
649
+      # The SoH reply will be turned into a request which
650
+      # can be sent to a specific virtual server:
651
+      #
652
+#     soh_virtual_server = "soh-server"
653
+    }
654
+
655
+    #
656
+    #  This takes no configuration.
657
+    #
658
+    #  Note that it is the EAP MS-CHAPv2 sub-module, not
659
+    #  the main 'mschap' module.
660
+    #
661
+    #  Note also that in order for this sub-module to work,
662
+    #  the main 'mschap' module MUST ALSO be configured.
663
+    #
664
+    #  This module is the *Microsoft* implementation of MS-CHAPv2
665
+    #  in EAP.  There is another (incompatible) implementation
666
+    #  of MS-CHAPv2 in EAP by Cisco, which FreeRADIUS does not
667
+    #  currently support.
668
+    #
669
+    mschapv2 {
670
+      #  Prior to version 2.1.11, the module never
671
+      #  sent the MS-CHAP-Error message to the
672
+      #  client.  This worked, but it had issues
673
+      #  when the cached password was wrong.  The
674
+      #  server *should* send "E=691 R=0" to the
675
+      #  client, which tells it to prompt the user
676
+      #  for a new password.
677
+      #
678
+      #  The default is to behave as in 2.1.10 and
679
+      #  earlier, which is known to work.  If you
680
+      #  set "send_error = yes", then the error
681
+      #  message will be sent back to the client.
682
+      #  This *may* help some clients work better,
683
+      #  but *may* also cause other clients to stop
684
+      #  working.
685
+      #
686
+#     send_error = no
687
+    }
688
+  }

+ 450
- 0
freeradius/config/tmp/freeradius/experimental.conf View File

@@ -0,0 +1,450 @@
1
+#
2
+#  This file contains the configuration for experimental modules.
3
+#
4
+#  By default, it is NOT included in the build.
5
+#
6
+#  $Id: 3db2f300329829b4810b00d3181f13bbac10ccd0 $
7
+#
8
+
9
+	# Configuration for the Python module.
10
+	#
11
+	# Where radiusd is a Python module, radiusd.py, and the
12
+	# function 'authorize' is called.  Here is a dummy piece
13
+	# of code:
14
+	# 
15
+	#	def authorize(params):
16
+	#	    print params
17
+	#	    return (5, ('Reply-Message', 'banned'))
18
+	#
19
+	# The RADIUS value-pairs are passed as a tuple of tuple
20
+	# pairs as the first argument, e.g. (('attribute1',
21
+	# 'value1'), ('attribute2', 'value2'))
22
+	#
23
+	# The function return is a tuple with the first element
24
+	# being the return value of the function.
25
+	# The 5 corresponds to RLM_MODULE_USERLOCK. I plan to
26
+	# write the return values as Python symbols to avoid
27
+	# confusion.
28
+	#
29
+	# The remaining tuple members are the string form of
30
+	# value-pairs which are passed on to pairmake().
31
+	#
32
+	python {
33
+		mod_instantiate = radiusd_test
34
+		func_instantiate = instantiate
35
+
36
+		mod_authorize = radiusd_test
37
+		func_authorize = authorize
38
+
39
+		mod_accounting = radiusd_test
40
+		func_accounting = accounting
41
+
42
+		mod_pre_proxy = radiusd_test
43
+		func_pre_proxy = pre_proxy
44
+
45
+		mod_post_proxy = radiusd_test
46
+		func_post_proxy = post_proxy
47
+
48
+		mod_post_auth = radiusd_test
49
+		func_post_auth = post_auth
50
+
51
+		mod_recv_coa = radiusd_test
52
+		func_recv_coa = recv_coa
53
+
54
+		mod_send_coa = radiusd_test
55
+		func_send_coa = send_coa
56
+
57
+		mod_detach = radiusd_test
58
+		func_detach = detach
59
+	}
60
+
61
+	
62
+	# Configuration for the example module.  Uncommenting it will cause it
63
+	# to get loaded and initialized, but should have no real effect as long
64
+	# it is not referencened in one of the autz/auth/preacct/acct sections
65
+	example {
66
+		#  Boolean variable.
67
+		# allowed values: {no, yes}
68
+		boolean = yes
69
+
70
+		#  An integer, of any value.
71
+		integer = 16
72
+
73
+		#  A string.
74
+		string = "This is an example configuration string"
75
+
76
+		# An IP address, either in dotted quad (1.2.3.4) or hostname
77
+		# (example.com)
78
+		ipaddr = 127.0.0.1
79
+
80
+		# A subsection
81
+		mysubsection {
82
+			anotherinteger = 1000
83
+			# They nest
84
+			deeply nested {
85
+				string = "This is a different string"
86
+			}
87
+		}
88
+	}
89
+
90
+	#
91
+	#  To create a dbm users file, do:
92
+	#
93
+	#   cat test.users | rlm_dbm_parser -f /etc/raddb/users_db
94
+	#
95
+	#  Then add 'dbm' in 'authorize' section.
96
+	#
97
+	#  Note that even if the file has a ".db" or ".dbm" extension,
98
+	#  you may have to specify it here without that extension.  This
99
+	#  is because the DBM libraries "helpfully" add a ".db" to the
100
+	#  filename, but don't check if it's already there.
101
+	#
102
+	dbm {
103
+		usersfile = ${confdir}/users_db
104
+	}
105
+
106
+	#
107
+	#  Perform NT-Domain authentication.  This only works
108
+	#  with PAP authentication.  That is, Authentication-Request
109
+	#  packets containing a User-Password attribute.
110
+	#
111
+	#  To use it, add 'smb' into the 'authenticate' section,
112
+	#  and then in another module (usually the 'users' file),
113
+	#  set 'Auth-Type := SMB'
114
+	#
115
+	#  WARNING: this module is not only experimental, it's also
116
+	#  a security threat. It's not recommended to use it until
117
+	#  it gets fixed.
118
+	#
119
+	smb {
120
+		server = ntdomain.server.example.com
121
+		backup = backup.server.example.com
122
+		domain = NTDOMAIN
123
+	}
124
+
125
+	# See doc/rlm_fastusers before using this
126
+	# module or changing these values.
127
+	#
128
+	fastusers {
129
+		usersfile = ${confdir}/users_fast
130
+		hashsize = 1000
131
+		compat = no
132
+		# Reload the hash every 600 seconds (10mins)
133
+		hash_reload = 600
134
+	}
135
+
136
+	# Caching module
137
+	#
138
+	# Should be added in the post-auth section (after all other modules)
139
+	# and in the authorize section (before any other modules)
140
+	#
141
+	# authorize {
142
+	#	caching {
143
+	#		ok = return
144
+	#	}
145
+	#	[... other modules ...]
146
+	# }
147
+	# post-auth {
148
+	#	[... other modules ...]
149
+	#	caching
150
+	# }
151
+	#
152
+	# The caching module will cache the Auth-Type and reply items
153
+	# and send them back on any subsequent requests for the same key
154
+	#
155
+	# Configuration:
156
+	#
157
+	# filename: The gdbm file to use for the cache database
158
+	#		(can be memory mapped for more speed)
159
+	#
160
+	# key: A string to xlat and use as a key. For instance,
161
+	#	"%{Acct-Unique-Session-Id}"
162
+	#
163
+	# post-auth: If we find a cached entry, set the post-auth to that value
164
+	#
165
+	# cache-ttl: The time to cache the entry. The same time format
166
+	#		as the counter module apply here.
167
+	#	  num[hdwm] where:
168
+	#  	h: hours, d: days, w: weeks, m: months
169
+	#  	If the letter is ommited days will be assumed.
170
+	#	e.g. 1d == one day
171
+	#
172
+	# cache-size: The gdbm cache size to request (default 1000)
173
+	#
174
+	# hit-ratio: If set to non-zero we print out statistical
175
+	#	information after so many cache requests
176
+	#
177
+	# cache-rejects: Do we also cache rejects, or not? (default 'yes')
178
+	#
179
+	caching {
180
+		filename = ${db_dir}/db.cache
181
+		cache-ttl = 1d
182
+		hit-ratio = 1000
183
+		key = "%{Acct-Unique-Session-Id}"
184
+		#post-auth = ""
185
+		# cache-size = 2000
186
+		# cache-rejects = yes
187
+	}
188
+
189
+
190
+	# Simple module for logging of Account packets to radiusd.log
191
+	# You need to declare it in the accounting section for it to work
192
+	acctlog {
193
+		acctlog_update = ""
194
+		acctlog_start = "Connect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address})"
195
+		acctlog_stop = "Disconnect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address}) %{Acct-Session-Time} seconds"
196
+		acctlog_on = "NAS %C (%{NAS-IP-Address}) just came online"
197
+		acctlog_off = "NAS %C (%{NAS-IP-Address}) just went offline"
198
+	}
199
+
200
+	# Another implementation of the EAP module.
201
+	#
202
+	#  This module requires the libeap.so file from the hostap
203
+	#  software (http://hostap.epitest.fi/hostapd/).  It has been
204
+	#  tested on the development version of hostapd (0.6.1) ONLY.
205
+	#
206
+	#  In order to use it, you MUST build a "libeap.so" in hostapd,
207
+	#  which is not done by default.
208
+	#
209
+	#  You MUST also edit the file: src/modules/rlm_eap2/Makefile
210
+	#  to point to the location of the hostap include files.
211
+	#
212
+	#  This module CANNOT be used in the same way as the current
213
+	#  FreeRADIUS "eap" module.  There is NO way to look inside of
214
+	#  a tunneled request.  There is NO way to proxy a tunneled
215
+	#  request.  There is NO way to even look at the user name inside
216
+	#  of the tunneled request.  There is NO way to control the
217
+	#  choice of EAP types inside of the tunnel.  You MUST force
218
+	#  the server to choose "eap2" for authentication, because this
219
+	#  module has no "authorize" section.
220
+	#
221
+	#  If you want to use this module for experimentation, please
222
+	#  post your comments to the freeradius-devel list:
223
+	#
224
+	#    http://lists.freeradius.org/mailman/listinfo/freeradius-devel
225
+	#
226
+	#  If you want to use this module in a production (i.e. real-world)
227
+	#  environment:
228
+	#
229
+	#	!!! DO NOT USE IT IN A PRODUCTION ENVIRONMENT !!!
230
+	#
231
+	#  The module needs additional work to make it ready for
232
+	#  production use..  Please supply patches, or sponsor the
233
+	#  work by hiring a developer.  Do NOT ask when the work will
234
+	#  be done, because there is no plan to finish this module
235
+	#  unless there is demand for it.
236
+	#
237
+	eap2 {
238
+		#  EAP types are chosen in the order that they are
239
+		#  listed in this section.  There is no "default_eap_type"
240
+		#  as with rlm_eap.  Instead, the *first* EAP type is
241
+		#  used as the default type.
242
+		#
243
+		peap {
244
+		}
245
+
246
+		ttls {
247
+		}
248
+
249
+		#  This is the ONLY EAP type that has any configuration.
250
+		#  All other EAP types have no configuration.
251
+		#
252
+		tls {
253
+			ca_cert = ${confdir}/certs/ca.pem
254
+			server_cert = ${confdir}/certs/server.pem
255
+			private_key_file = ${confdir}/certs/server.pem
256
+			private_key_password = whatever
257
+		}
258
+
259
+		#
260
+		#  These next two methods do not supply keying material.
261
+		#
262
+		md5 {
263
+		}
264
+
265
+		mschapv2 {
266
+		}
267
+
268
+		fast { 
269
+			pac_opaque_encr_key = 000102030405060708090a0b0c0d0e0f 
270
+			eap_fast_a_id = xxxxxx 
271
+			eap_fast_a_id_info = my_server 
272
+			eap_fast_prov = 3
273
+			pac_key_lifetime = 604800 # 7 days
274
+			pac_key_refresh_tim = 86400
275
+		} 
276
+
277
+		#  LEAP is NOT supported by this module.
278
+		#  Use the "eap" module instead.
279
+
280
+		#  For other methods that MIGHT work, see the
281
+		#  configuration of hostap.  The methods are statically
282
+		#  linked in at compile time, and cannot be controlled
283
+		#  here.
284
+	}
285
+
286
+	#  Configuration for experimental EAP types.  The sub-sections
287
+	#  can be copied into eap.conf.
288
+	eap {
289
+		ikev2 {
290
+
291
+		# Server auth type 
292
+		# Allowed values are:
293
+		#  cert   - for certificate based server authentication,
294
+		#           other required settings for this type are
295
+		#	    'private_key_file' and 'certificate_file'
296
+		#  secret - for shared secret based server authentication, 
297
+		#           other required settings for this type is 'id'
298
+		# Default value of this option is 'secret'
299
+	#     server_authtype=cert
300
+
301
+		# Allowed default client auth types
302
+		# Allowed values are:
303
+		#   secret - for shared secret based client	authentication
304
+		#   cert   - for certificate based client authentication
305
+		#   both   - shared secret and certificate is allowed
306
+		#   none   - authentication will always fail
307
+		# Default value for this option is 'both'. This option could
308
+		#  be overwritten within 'usersfile' file by EAP-IKEv2-Auth
309
+		#  option. 
310
+	#   default_authtype = both
311
+
312
+		# path to trusted CA certificate file
313
+		CA_file="/path/to/CA/cacert.pem"
314
+
315
+		# path to CRL file, if not set, then there will be no
316
+		#  checks against CRL
317
+	#   crl_file="/path/to/crl.pem"
318
+
319
+		# path to file with user settings 
320
+		#
321
+		#  Note that this file is read ONLY on module initialization!
322
+		#
323
+		# default ${confdir}/eap_ikev2_users
324
+	#   usersfile=${confdir}/eap_ikev2_users
325
+
326
+#
327
+#  Sample "eap_ikev2_users" file entry:
328
+#
329
+#username  EAP-IKEv2-IDType := KEY_ID,  EAP-IKEv2-Secret := "tajne"
330
+
331
+## where:
332
+## username           - client user name from IKE-AUTH (IDr)  or CommonName
333
+##                      from x509 certificate
334
+## EAP-IKEv2-IDType   - ID Type - same as in expected IDType payload
335
+##	                allowable attributes for EAP-IKEv2-IDType:
336
+##	                IPV4_ADDR FQDN RFC822_ADDR IPV6_ADDR DER_ASN1_DN
337
+##			DER_ASN1_GN KEY_ID
338
+## EAP-IKEv2-Secret   - shared secret
339
+## EAP-IKEv2-AuthType - optional parameter which defines expected client auth
340
+##                      type. Allowed values are: secret,cert,both,none.
341
+##			For the meaning of this values, please see the
342
+##                      description of 'default_authtype'.
343
+##                      This attribute can overwrite 'default_authtype' value.
344
+
345
+
346
+
347
+		# path to  file with server private key
348
+		private_key_file="/path/to/srv-private-key.pem"
349
+
350
+		# password to private key file
351
+		private_key_password="passwd"
352
+
353
+		# path to file with server certificate
354
+		certificate_file="/path/to/srv-cert.pem"
355
+
356
+		# server identity string
357
+		id="deMaio"
358
+
359
+		# Server identity type. Allowed values are:
360
+		# IPV4_ADDR, FQDN, RFC822_ADDR, IPV6_ADDR, ASN1_DN, ASN1_GN,
361
+		#  KEY_ID
362
+		# Default value is:	KEY_ID
363
+	#   id_type = KEY_ID
364
+
365
+
366
+		# MTU (default: 1398)
367
+	#   fragment_size = 1398
368
+    
369
+		# maximal allowed number of resends SA_INIT after receiving
370
+		# 'invalid KEY' notification (default 3)
371
+	#   DH_counter_max = 3
372
+
373
+		# option which is used to control whenever send CERT REQ
374
+		#  payload or not.
375
+		# Allowed values for this option are "yes" or "no".
376
+		#Default value is "no".
377
+	#   certreq = "yes"
378
+
379
+		# option which cotrols fast reconnect capability.
380
+		# Allowed valuse for this option are "yes" or "no".
381
+		# Default value is "yes".
382
+	#   enable_fast_reauth = "no"
383
+    
384
+		# option which is used to control performing of DH exchange
385
+		#  during fast rekeying protocol run.
386
+		# Allowed values for this option are "yes" or "no".
387
+		# Default value is "no"
388
+	#   fast_DH_exchange = "yes"
389
+
390
+		# Option which is used to set up expiration time of inactive
391
+		#  IKEv2 session.
392
+		# After selected period of time (in seconds), inactive
393
+		# session data will be deleted.
394
+		# Default value of this option is set to 900 seconds
395
+	#   fast_timer_expire = 900
396
+
397
+		# list of server proposals of available cryptographic
398
+		# suites
399
+		proposals {
400
+			# proposal number #1 
401
+			proposal {
402
+
403
+				# Supported transforms types: encryption,
404
+				# prf, integrity, dhgroup. For multiple
405
+				# transforms just simple repeat key (i.e.
406
+				# integity).
407
+
408
+				# encryption algorithm
409
+				# supported algorithms:
410
+				# null,3des,aes_128_cbc,aes_192_cbc,
411
+				# aes_256_cbc,idea
412
+	            		# blowfish:n, where n range from 8 to 448 bits,
413
+				#  step 8 bits
414
+				# cast:n, where n range from 40 to 128 bits,
415
+				#  step 8 bits 
416
+				encryption = 3des
417
+
418
+				# pseudo random function. Supported prf's:
419
+				# hmac_md5, hmac_sha1, hmac_tiger
420
+				prf = hmac_sha1
421
+
422
+				# integrity algorithm. Supported algorithms:
423
+				# hmac_md5_96, hmac_sha1_96,des_mac
424
+				integrity = hmac_sha1_96
425
+				integrity = hmac_md5_96
426
+
427
+				# Diffie-Hellman groups:
428
+				# modp768, modp1024, modp1536, modp2048, 
429
+				# modp3072, modp4096, modp6144, modp8192
430
+				dhgroup = modp2048 
431
+			}
432
+		
433
+			# proposal number #2 
434
+			proposal {
435
+				encryption = 3des
436
+				prf = hmac_md5
437
+				integrity = hmac_md5_96
438
+				dhgroup = modp1024
439
+			}	
440
+
441
+			# proposal number #3 
442
+			proposal {
443
+				encryption=3des
444
+				prf=hmac_md5
445
+				integrity=hmac_md5_96
446
+				dhgroup=modp2048
447
+			} 
448
+		}
449
+		}
450
+	}

+ 77
- 0
freeradius/config/tmp/freeradius/hints View File

@@ -0,0 +1,77 @@
1
+# hints
2
+#
3
+#	The hints file.   This file is used to match
4
+#	a request, and then add attributes to it.  This
5
+#	process allows a user to login as "bob.ppp" (for example),
6
+#	and receive a PPP connection, even if the NAS doesn't
7
+#	ask for PPP.  The "hints" file is used to match the
8
+#	".ppp" portion of the username, and to add a set of
9
+#	"user requested PPP" attributes to the request.
10
+#
11
+#	Matching can take place with the the Prefix and Suffix
12
+#	attributes, just like in the "users" file.
13
+#	These attributes operate ONLY on the username, though.
14
+#
15
+#	Note that the attributes that are set for each
16
+#	entry are _NOT_ passed back to the terminal server.
17
+#	Instead they are added to the information that has
18
+#	been _SENT_ by the terminal server.
19
+#
20
+#	This extra information can be used in the users file to
21
+#	match on. Usually this is done in the DEFAULT entries,
22
+#	of which there can be more than one.
23
+#
24
+#	In addition a matching entry can transform a username
25
+#	for authentication purposes if the "Strip-User-Name"
26
+#	variable is set to Yes in an entry (default is Yes).
27
+#
28
+#	A special non-protocol name-value pair called "Hint"
29
+#	can be set to match on in the "users" file.
30
+#
31
+#	The following is how most ISPs want to set this up.
32
+#
33
+# Version:	$Id: f92ffb9f1e5bd0509b2e0e5e015001fda52bdfc3 $
34
+#
35
+
36
+
37
+DEFAULT	Suffix == ".ppp", Strip-User-Name = Yes
38
+	Hint = "PPP",
39
+	Service-Type = Framed-User,
40
+	Framed-Protocol = PPP
41
+
42
+DEFAULT	Suffix == ".slip", Strip-User-Name = Yes
43
+	Hint = "SLIP",
44
+	Service-Type = Framed-User,
45
+	Framed-Protocol = SLIP
46
+
47
+DEFAULT	Suffix == ".cslip", Strip-User-Name = Yes
48
+	Hint = "CSLIP",
49
+	Service-Type = Framed-User,
50
+	Framed-Protocol = SLIP,
51
+	Framed-Compression = Van-Jacobson-TCP-IP
52
+
53
+######################################################################
54
+#
55
+#	These entries are old, and commented out by default.
56
+#	They confuse too many people when "Peter" logs in, and the
57
+#	server thinks that the user "eter" is asking for PPP.
58
+#
59
+#DEFAULT	Prefix == "U", Strip-User-Name = No
60
+#	Hint = "UUCP"
61
+
62
+#DEFAULT	Prefix == "P", Strip-User-Name = Yes
63
+#	Hint = "PPP",
64
+#	Service-Type = Framed-User,
65
+#	Framed-Protocol = PPP
66
+
67
+#DEFAULT	Prefix == "S", Strip-User-Name = Yes
68
+#	Hint = "SLIP",
69
+#	Service-Type = Framed-User,
70
+#	Framed-Protocol = SLIP
71
+
72
+#DEFAULT	Prefix == "C", Strip-User-Name = Yes
73
+#	Hint = "CSLIP",
74
+#	Service-Type = Framed-User,
75
+#	Framed-Protocol = SLIP,
76
+#	Framed-Compression = Van-Jacobson-TCP-IP
77
+

+ 46
- 0
freeradius/config/tmp/freeradius/huntgroups View File

@@ -0,0 +1,46 @@
1
+#
2
+# huntgroups	This file defines the `huntgroups' that you have. A
3
+#		huntgroup is defined by specifying the IP address of
4
+#		the NAS and possibly a port range. Port can be identified
5
+#		as just one port, or a range (from-to), and multiple ports
6
+#		or ranges of ports must be seperated by a comma. For
7
+#		example: 1,2,3-8
8
+#
9
+#		Matching is done while RADIUS scans the user file; if it
10
+#		includes the selection criterium "Huntgroup-Name == XXX"
11
+#		the huntgroup is looked up in this file to see if it
12
+#		matches. There can be multiple definitions of the same
13
+#		huntgroup; the first one that matches will be used.
14
+#
15
+#		This file can also be used to define restricted access
16
+#		to certain huntgroups. The second and following lines
17
+#		define the access restrictions (based on username and
18
+#		UNIX usergroup) for the huntgroup.
19
+#
20
+
21
+#
22
+# Our POP in Alphen a/d Rijn has 3 terminal servers. Create a Huntgroup-Name
23
+# called Alphen that matches on all three terminal servers.
24
+#
25
+#alphen		NAS-IP-Address == 192.168.2.5
26
+#alphen		NAS-IP-Address == 192.168.2.6
27
+#alphen		NAS-IP-Address == 192.168.2.7
28
+
29
+#
30
+# The POP in Delft consists of only one terminal server.
31
+#
32
+#delft		NAS-IP-Address == 192.168.3.5
33
+
34
+#
35
+# Ports 0-7 on the first terminal server in Alphen are connected to
36
+# a huntgroup that is for business users only. Note that only one
37
+# of the username or groupname has to match to get access (OR/OR).
38
+#
39
+# Note that this huntgroup is a subset of the "alphen" huntgroup.
40
+#
41
+#business	NAS-IP-Address == 192.168.2.5, NAS-Port-Id == 0-7
42
+#		User-Name = rogerl,
43
+#		User-Name = henks,
44
+#		Group = business,
45
+#		Group = staff
46
+

+ 76
- 0
freeradius/config/tmp/freeradius/ldap.attrmap View File

@@ -0,0 +1,76 @@
1
+#
2
+# Mapping of RADIUS dictionary attributes to LDAP directory attributes
3
+# to be used by LDAP authentication and authorization module (rlm_ldap)
4
+#
5
+# Format:
6
+#   ItemType	RADIUS-Attribute-Name		ldapAttributeName  [operator]
7
+#
8
+# Where:
9
+#   ItemType              = checkItem or replyItem 
10
+#   RADIUS-Attribute-Name = attribute name in RADIUS dictionary
11
+#   ldapAttributeName     = attribute name in LDAP schema
12
+#   operator              = optional, and may not be present.
13
+#			    If not present, defaults to "==" for checkItems,
14
+#			    and "=" for replyItems.
15
+#			    If present, the operator here should be one
16
+#			    of the same operators as defined in the "users"3
17
+#			    file ("man users", or "man 5 users").
18
+#			    If an operator is present in the value of the
19
+#			    LDAP entry (i.e. ":=foo"), then it over-rides
20
+#			    both the default, and any operator given here.
21
+#
22
+# If $GENERIC$ is specified as RADIUS-Attribute-Name, the line specifies
23
+# a LDAP attribute which can be used to store any RADIUS 
24
+# attribute/value-pair in LDAP directory.
25
+#
26
+# You should edit this file to suit it to your needs.
27
+#
28
+
29
+checkItem	$GENERIC$			radiusCheckItem
30
+replyItem	$GENERIC$			radiusReplyItem
31
+
32
+checkItem	Auth-Type			radiusAuthType
33
+checkItem	Simultaneous-Use		radiusSimultaneousUse
34
+checkItem	Called-Station-Id		radiusCalledStationId
35
+checkItem	Calling-Station-Id		radiusCallingStationId
36
+checkItem	LM-Password			lmPassword
37
+checkItem	NT-Password			ntPassword
38
+checkItem	LM-Password			sambaLmPassword
39
+checkItem	NT-Password			sambaNtPassword
40
+checkItem	LM-Password			dBCSPwd
41
+checkitem	Password-With-Header		userPassword
42
+checkItem	SMB-Account-CTRL-TEXT		acctFlags
43
+checkItem	Expiration			radiusExpiration
44
+checkItem	NAS-IP-Address			radiusNASIpAddress
45
+
46
+replyItem	Service-Type			radiusServiceType
47
+replyItem	Framed-Protocol			radiusFramedProtocol
48
+replyItem	Framed-IP-Address		radiusFramedIPAddress
49
+replyItem	Framed-IP-Netmask		radiusFramedIPNetmask
50
+replyItem	Framed-Route			radiusFramedRoute
51
+replyItem	Framed-Routing			radiusFramedRouting
52
+replyItem	Filter-Id			radiusFilterId
53
+replyItem	Framed-MTU			radiusFramedMTU
54
+replyItem	Framed-Compression		radiusFramedCompression
55
+replyItem	Login-IP-Host			radiusLoginIPHost
56
+replyItem	Login-Service			radiusLoginService
57
+replyItem	Login-TCP-Port			radiusLoginTCPPort
58
+replyItem	Callback-Number			radiusCallbackNumber
59
+replyItem	Callback-Id			radiusCallbackId
60
+replyItem	Framed-IPX-Network		radiusFramedIPXNetwork
61
+replyItem	Class				radiusClass
62
+replyItem	Session-Timeout			radiusSessionTimeout
63
+replyItem	Idle-Timeout			radiusIdleTimeout
64
+replyItem	Termination-Action		radiusTerminationAction
65
+replyItem	Login-LAT-Service		radiusLoginLATService
66
+replyItem	Login-LAT-Node			radiusLoginLATNode
67
+replyItem	Login-LAT-Group			radiusLoginLATGroup
68
+replyItem	Framed-AppleTalk-Link		radiusFramedAppleTalkLink
69
+replyItem	Framed-AppleTalk-Network	radiusFramedAppleTalkNetwork
70
+replyItem	Framed-AppleTalk-Zone		radiusFramedAppleTalkZone
71
+replyItem	Port-Limit			radiusPortLimit
72
+replyItem	Login-LAT-Port			radiusLoginLATPort
73
+replyItem	Reply-Message			radiusReplyMessage
74
+replyItem	Tunnel-Type			radiusTunnelType
75
+replyItem	Tunnel-Medium-Type		radiusTunnelMediumType
76
+replyItem	Tunnel-Private-Group-Id		radiusTunnelPrivateGroupId

+ 17
- 0
freeradius/config/tmp/freeradius/modules/acct_unique View File

@@ -0,0 +1,17 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: cfd89eb1bf690b605892969ebd922e6885f24fcc $
4
+
5
+#
6
+#  Create a unique accounting session Id.  Many NASes re-use
7
+#  or repeat values for Acct-Session-Id, causing no end of
8
+#  confusion.
9
+#
10
+#  This module will add a (probably) unique session id 
11
+#  to an accounting packet based on the attributes listed
12
+#  below found in the packet.  See doc/rlm_acct_unique for
13
+#  more information.
14
+#
15
+acct_unique {
16
+	key = "User-Name, Acct-Session-Id, NAS-IP-Address, NAS-Identifier, NAS-Port"
17
+}

+ 31
- 0
freeradius/config/tmp/freeradius/modules/always View File

@@ -0,0 +1,31 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: c28187f05d4f0416442203b016feb7e2b818716f $
4
+
5
+#
6
+# The "always" module is here for debugging purposes. Each
7
+# instance simply returns the same result, always, without
8
+# doing anything.
9
+always fail {
10
+	rcode = fail
11
+}
12
+always reject {
13
+	rcode = reject
14
+}
15
+always noop {
16
+	rcode = noop
17
+}
18
+always handled {
19
+	rcode = handled
20
+}
21
+always updated {
22
+	rcode = updated
23
+}
24
+always notfound {
25
+	rcode = notfound
26
+}
27
+always ok {
28
+	rcode = ok
29
+	simulcount = 0
30
+	mpp = no
31
+}

+ 48
- 0
freeradius/config/tmp/freeradius/modules/attr_filter View File

@@ -0,0 +1,48 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: acb28a9c587526a22f9310ade21d6a480a0bfe28 $
4
+
5
+#
6
+#  This file defines a number of instances of the "attr_filter" module.
7
+#
8
+
9
+# attr_filter - filters the attributes received in replies from
10
+# proxied servers, to make sure we send back to our RADIUS client
11
+# only allowed attributes.
12
+attr_filter attr_filter.post-proxy {
13
+	attrsfile = ${confdir}/attrs
14
+}
15
+
16
+# attr_filter - filters the attributes in the packets we send to
17
+# the RADIUS home servers.
18
+attr_filter attr_filter.pre-proxy {
19
+	attrsfile = ${confdir}/attrs.pre-proxy
20
+}
21
+
22
+# Enforce RFC requirements on the contents of Access-Reject
23
+# packets.  See the comments at the top of the file for
24
+# more details.
25
+#
26
+attr_filter attr_filter.access_reject {
27
+	key = %{User-Name}
28
+	attrsfile = ${confdir}/attrs.access_reject
29
+}
30
+
31
+# Enforce RFC requirements on the contents of Access-Reject
32
+# packets.  See the comments at the top of the file for
33
+# more details.
34
+#
35
+attr_filter attr_filter.access_challenge {
36
+	key = %{User-Name}
37
+	attrsfile = ${confdir}/attrs.access_challenge
38
+}
39
+
40
+
41
+#  Enforce RFC requirements on the contents of the
42
+#  Accounting-Response packets.  See the comments at the
43
+#  top of the file for more details.
44
+#
45
+attr_filter attr_filter.accounting_response {
46
+	key = %{User-Name}
47
+	attrsfile = ${confdir}/attrs.accounting_response
48
+}

+ 46
- 0
freeradius/config/tmp/freeradius/modules/attr_rewrite View File

@@ -0,0 +1,46 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 8fb93224288061781980a156d541f5283abee1a0 $
4
+
5
+#  rewrite arbitrary packets.  Useful in accounting and authorization.
6
+#
7
+#  As of 2.0, much of the functionality of this module is in "unlang".
8
+#  You should probably investigate using that before trying to use
9
+#  the "attr_rewrite" module.
10
+#
11
+#
12
+#  The module can also use the Rewrite-Rule attribute. If it
13
+#  is set and matches the name of the module instance, then
14
+#  that module instance will be the only one which runs.
15
+#
16
+#  Also if new_attribute is set to yes then a new attribute
17
+#  will be created containing the value replacewith and it
18
+#  will be added to searchin (packet, reply, proxy,
19
+#  proxy_reply or config).
20
+#
21
+# searchfor,ignore_case and max_matches will be ignored in that case.
22
+#
23
+# Backreferences are supported.
24
+#	%{0} will contain the string the whole match
25
+#	%{1} to %{8} will contain the contents of the 1st to
26
+#	the 8th parentheses
27
+#
28
+# If max_matches is greater than one, the backreferences will
29
+# correspond to the first attributed that matched.
30
+
31
+#
32
+attr_rewrite sanecallerid {
33
+	attribute = Called-Station-Id
34
+	# may be "packet", "reply", "proxy", "proxy_reply" or "config"
35
+	searchin = packet
36
+	searchfor = "[+ ]"
37
+	replacewith = ""
38
+	ignore_case = no
39
+	new_attribute = no
40
+	max_matches = 10
41
+
42
+	## If set to yes then the replace string will be
43
+	## appended to the original string
44
+	append = no
45
+}
46
+

+ 77
- 0
freeradius/config/tmp/freeradius/modules/cache View File

@@ -0,0 +1,77 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: da4a099beae8eeb3bfe5f70f20523a4258f7f0cd $
4
+
5
+#
6
+#	A module to cache attributes.  The idea is that you can look
7
+#	up information in a database, and then cache it.  Repeated
8
+#	requests for the same information will then have the cached
9
+#	values added to the request.
10
+#
11
+#	The module can cache a fixed set of attributes per key.
12
+#	It can be listed in "authorize", "post-auth", "pre-proxy"
13
+#	and "post-proxy".
14
+#
15
+#	If you want different things cached for authorize and post-auth,
16
+#	you will need to define two instances of the "cache" module.
17
+#
18
+#	The module returns "ok" if it found a cache entry.
19
+#	The module returns "updated" if it added a new cache entry.
20
+#	The module returns "noop" if it did nothing.
21
+#
22
+cache {
23
+	#  The key used to index the cache.  It is dynamically expanded
24
+	#  at run time.
25
+	key = "%{User-Name}"
26
+
27
+	#  The TTL of cache entries, in seconds.  Entries older than this
28
+	#  will be expired.
29
+	#
30
+	#  You can set the TTL per cache entry, but adding a control
31
+	#  variable "Cache-TTL".  The value there will over-ride this one.
32
+	#  Setting a Cache-TTL of 0 means "delete this entry".
33
+	#
34
+	#  This value should be between 10 and 86400.
35
+	ttl = 10
36
+
37
+	#  A timestamp used to flush the cache, via
38
+	#
39
+	#	radmin -e "set module config cache epoch 123456789"
40
+	#
41
+	#  Where last value is a 32-bit Unix timestamp.  Cache entries
42
+	#  older than this are expired, and new entries added.
43
+	#
44
+	#  You should ALWAYS leave it as "epoch = 0" here.
45
+	epoch = 0
46
+	
47
+	#  The module can also operate in status-only mode where it will
48
+	#  not add new cache entries, or merge existing ones.
49
+	#
50
+	#  To enable set the control variable "Cache-Status-Only" to "yes"
51
+	#  The module will return "ok" if it found a cache entry.
52
+	#  The module will return "notfound" if it failed to find a cache entry,
53
+	#  or the entry had expired.
54
+	#
55
+	#  Note: expired entries will still be removed.
56
+
57
+	#  If yes the following attributes will be added to the request list:
58
+	#  	* Cache-Entry-Hits - The number of times this entry has been
59
+	#			     retrieved.
60
+	add-stats = no
61
+
62
+	#  The list of attributes to cache for a particular key.
63
+	#  Each key gets the same set of cached attributes.
64
+	#  The attributes are dynamically expanded at run time.
65
+	#
66
+	#  You can specify which list the attribute goes into by
67
+	#  prefixing the attribute name with the list.  This allows
68
+	#  you to update multiple lists with one configuration.
69
+	#
70
+	#  If no list is specified the request list will be updated.
71
+	update {
72
+		# list:Attr-Name
73
+		reply:Reply-Message += "I'm the cached reply from %t"
74
+
75
+		control:Class := 0x010203
76
+	}
77
+}

+ 11
- 0
freeradius/config/tmp/freeradius/modules/chap View File

@@ -0,0 +1,11 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: e2a3cd3b110ffffdbcff86c7fc65a9275ddc3379 $
4
+
5
+# CHAP module
6
+#
7
+#  To authenticate requests containing a CHAP-Password attribute.
8
+#
9
+chap {
10
+	# no configuration
11
+}

+ 44
- 0
freeradius/config/tmp/freeradius/modules/checkval View File

@@ -0,0 +1,44 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: ed26e571e8f0bcf3bf586ceb16d0cdff182f5017 $
4
+
5
+#  A simple value checking module
6
+#
7
+#  As of 2.0, much of the functionality of this module is in "unlang".
8
+#  You should probably investigate using that before trying to use
9
+#  the "checkval" module.
10
+#
11
+#  It can be used to check if an attribute value in the request
12
+#  matches a (possibly multi valued) attribute in the check
13
+#  items This can be used for example for caller-id
14
+#  authentication.  For the module to run, both the request
15
+#  attribute and the check items attribute must exist
16
+#
17
+#  i.e.
18
+#  A user has an ldap entry with 2 radiusCallingStationId
19
+#  attributes with values "12345678" and "12345679".  If we
20
+#  enable rlm_checkval, then any request which contains a
21
+#  Calling-Station-Id with one of those two values will be
22
+#  accepted.  Requests with other values for
23
+#  Calling-Station-Id will be rejected.
24
+#
25
+#  Regular expressions in the check attribute value are allowed
26
+#  as long as the operator is '=~'
27
+#
28
+checkval {
29
+	# The attribute to look for in the request
30
+	item-name = Calling-Station-Id
31
+
32
+	# The attribute to look for in check items. Can be multi valued
33
+	check-name = Calling-Station-Id
34
+
35
+	# The data type. Can be
36
+	# string,integer,ipaddr,date,abinary,octets
37
+	data-type = string
38
+
39
+	# If set to yes and we dont find the item-name attribute in the
40
+	# request then we send back a reject
41
+	# DEFAULT is no
42
+	#notfound-reject = no
43
+}
44
+	

+ 82
- 0
freeradius/config/tmp/freeradius/modules/counter View File

@@ -0,0 +1,82 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 2dad39a25c676821c6e602881e5bec52d738abfd $
4
+
5
+#  counter module:
6
+#  This module takes an attribute (count-attribute).
7
+#  It also takes a key, and creates a counter for each unique
8
+#  key.  The count is incremented when accounting packets are
9
+#  received by the server.  The value of the increment depends
10
+#  on the attribute type.
11
+#  If the attribute is Acct-Session-Time or of an integer type we add
12
+#  the value of the attribute. If it is anything else we increase the
13
+#  counter by one.
14
+#
15
+#  The 'reset' parameter defines when the counters are all reset to
16
+#  zero.  It can be hourly, daily, weekly, monthly or never.
17
+#
18
+#  hourly: Reset on 00:00 of every hour
19
+#  daily: Reset on 00:00:00 every day
20
+#  weekly: Reset on 00:00:00 on sunday
21
+#  monthly: Reset on 00:00:00 of the first day of each month
22
+#
23
+#  It can also be user defined. It should be of the form:
24
+#  num[hdwm] where:
25
+#  h: hours, d: days, w: weeks, m: months
26
+#  If the letter is ommited days will be assumed. In example:
27
+#  reset = 10h (reset every 10 hours)
28
+#  reset = 12  (reset every 12 days)
29
+#
30
+#
31
+#  The check-name attribute defines an attribute which will be
32
+#  registered by the counter module and can be used to set the
33
+#  maximum allowed value for the counter after which the user
34
+#  is rejected.
35
+#  Something like:
36
+#
37
+#  DEFAULT Max-Daily-Session := 36000
38
+#          Fall-Through = 1
39
+#
40
+#  You should add the counter module in the instantiate
41
+#  section so that it registers check-name before the files
42
+#  module reads the users file.
43
+#
44
+#  If check-name is set and the user is to be rejected then we
45
+#  send back a Reply-Message and we log a Failure-Message in
46
+#  the radius.log
47
+#
48
+#  If the count attribute is Acct-Session-Time then on each
49
+#  login we send back the remaining online time as a
50
+#  Session-Timeout attribute ELSE and if the reply-name is
51
+#  set, we send back that attribute.  The reply-name attribute
52
+#  MUST be of an integer type.
53
+#
54
+#  The counter-name can also be used instead of using the check-name
55
+#  like below:
56
+#
57
+#  DEFAULT  Daily-Session-Time > 3600, Auth-Type = Reject
58
+#      Reply-Message = "You've used up more than one hour today"
59
+#
60
+#  The allowed-servicetype attribute can be used to only take
61
+#  into account specific sessions. For example if a user first
62
+#  logs in through a login menu and then selects ppp there will
63
+#  be two sessions. One for Login-User and one for Framed-User
64
+#  service type. We only need to take into account the second one.
65
+#
66
+#  The module should be added in the instantiate, authorize and
67
+#  accounting sections.  Make sure that in the authorize
68
+#  section it comes after any module which sets the
69
+#  'check-name' attribute.
70
+#
71
+counter daily {
72
+	filename = ${db_dir}/db.daily
73
+	key = User-Name
74
+	count-attribute = Acct-Session-Time
75
+	reset = daily
76
+	counter-name = Daily-Session-Time
77
+	check-name = Max-Daily-Session
78
+	reply-name = Session-Timeout
79
+	allowed-servicetype = Framed-User
80
+	cache-size = 5000
81
+}
82
+

+ 25
- 0
freeradius/config/tmp/freeradius/modules/cui View File

@@ -0,0 +1,25 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 246461369a25c17feae3168bb66050203d4b8a34 $
4
+
5
+#
6
+#  Write Chargeable-User-Identity to the database.
7
+#
8
+#  Schema	raddb/sql/mysql/cui.sql
9
+#  Queries	raddb/sql/mysql/cui.conf
10
+#
11
+sql cui {
12
+	database = "mysql"
13
+	driver = "rlm_sql_${database}"
14
+	server = "localhost"
15
+	login = "db_login_name"
16
+	password = "db_password"
17
+	radius_db = "db_name"
18
+#	sqltrace = yes
19
+#	sqltracefile = ${logdir}/cuitrace.sql
20
+	num_sql_socks = 5
21
+	connect_failure_retry_delay = 60
22
+	cui_table = "cui"
23
+	sql_user_name = "%{User-Name}"
24
+#$INCLUDE sql/${database}/cui.conf
25
+}

+ 93
- 0
freeradius/config/tmp/freeradius/modules/detail View File

@@ -0,0 +1,93 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 2e68d065ec93d0644cf7e931d97fdfac4e2be552 $
4
+
5
+# Write a detailed log of all accounting records received.
6
+#
7
+detail {
8
+	#  Note that we do NOT use NAS-IP-Address here, as
9
+	#  that attribute MAY BE from the originating NAS, and
10
+	#  NOT from the proxy which actually sent us the
11
+	#  request.
12
+	#
13
+	#  The following line creates a new detail file for
14
+	#  every radius client (by IP address or hostname).
15
+	#  In addition, a new detail file is created every
16
+	#  day, so that the detail file doesn't have to go
17
+	#  through a 'log rotation'
18
+	#
19
+	#  If your detail files are large, you may also want
20
+	#  to add a ':%H' (see doc/variables.txt) to the end
21
+	#  of it, to create a new detail file every hour, e.g.:
22
+	#
23
+	#   ..../detail-%Y%m%d:%H
24
+	#
25
+	#  This will create a new detail file for every hour.
26
+	#
27
+	#  If you are reading detail files via the "listen" section
28
+	#  (e.g. as in raddb/sites-available/robust-proxy-accounting),
29
+	#  you MUST use a unique directory for each combination of a
30
+	#  detail file writer, and reader.  That is, there can only
31
+	#  be ONE "listen" section reading detail files from a
32
+	#  particular directory.
33
+	#
34
+	detailfile = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
35
+
36
+	#
37
+	#  If you are using radrelay, delete the above line for "detailfile",
38
+	#  and use this one instead:
39
+	#
40
+#	detailfile = ${radacctdir}/detail
41
+
42
+	#
43
+	#  The Unix-style permissions on the 'detail' file.
44
+	#
45
+	#  The detail file often contains secret or private
46
+	#  information about users.  So by keeping the file
47
+	#  permissions restrictive, we can prevent unwanted
48
+	#  people from seeing that information.
49
+	detailperm = 0600
50
+
51
+	# The Unix group of the log file.
52
+	#
53
+	# The user that the server runs as must be in the specified
54
+	# system group otherwise this will fail to work.
55
+	#
56
+#	group = freerad
57
+
58
+	#
59
+	#  Every entry in the detail file has a header which
60
+	#  is a timestamp.  By default, we use the ctime
61
+	#  format (see "man ctime" for details).
62
+	#
63
+	#  The header can be customized by editing this
64
+	#  string.  See "doc/variables.txt" for a description
65
+	#  of what can be put here.
66
+	#
67
+	header = "%t"
68
+
69
+	#
70
+	#  Uncomment this line if the detail file reader will be
71
+	#  reading this detail file.
72
+	#
73
+#	locking = yes
74
+
75
+	#
76
+	#  Log the Packet src/dst IP/port.  This is disabled by
77
+	#  default, as that information isn't used by many people.
78
+	#
79
+#	log_packet_header = yes
80
+
81
+	#
82
+	# Certain attributes such as User-Password may be
83
+	# "sensitive", so they should not be printed in the
84
+	# detail file.  This section lists the attributes
85
+	# that should be suppressed.
86
+	#
87
+	# The attributes should be listed one to a line.
88
+	#
89
+	#suppress {
90
+		# User-Password
91
+	#}
92
+
93
+}

+ 27
- 0
freeradius/config/tmp/freeradius/modules/detail.example.com View File

@@ -0,0 +1,27 @@
1
+# -*- text -*-
2
+#
3
+#  Detail file writer, used in the following examples:
4
+#
5
+#	raddb/sites-available/robust-proxy-accounting
6
+#	raddb/sites-available/decoupled-accounting
7
+#
8
+#  Note that this module can write detail files that are read by
9
+#  only ONE "listen" section.  If you use BOTH of the examples
10
+#  above, you will need to define TWO "detail" modules.
11
+#
12
+#  e.g. detail1.example.com && detail2.example.com
13
+#
14
+#
15
+#  We write *multiple* detail files here.  They will be processed by
16
+#  the detail "listen" section in the order that they were created.
17
+#  The directory containing these files should NOT be used for any
18
+#  other purposes.  i.e. It should have NO other files in it.
19
+#
20
+#  Writing multiple detail enables the server to process the pieces
21
+#  in smaller chunks.  This helps in certain catastrophic corner cases.
22
+#
23
+#  $Id: af7e3452fdd49ed6a3cd379c2a4d90e17f34532f $
24
+#
25
+detail detail.example.com {
26
+	detailfile = ${radacctdir}/detail.example.com/detail-%Y%m%d:%H:%G
27
+}

+ 75
- 0
freeradius/config/tmp/freeradius/modules/detail.log View File

@@ -0,0 +1,75 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: c36dce75c6d41b7470bd177a27ed96d3fe3dafe5 $
4
+
5
+#
6
+#  More examples of doing detail logs.
7
+
8
+#
9
+#  Many people want to log authentication requests.
10
+#  Rather than modifying the server core to print out more
11
+#  messages, we can use a different instance of the 'detail'
12
+#  module, to log the authentication requests to a file.
13
+#
14
+#  You will also need to un-comment the 'auth_log' line
15
+#  in the 'authorize' section, below.
16
+#
17
+detail auth_log {
18
+	detailfile = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/auth-detail-%Y%m%d
19
+
20
+	#
21
+	#  This MUST be 0600, otherwise anyone can read
22
+	#  the users passwords!
23
+	detailperm = 0600
24
+
25
+	# You may also strip out passwords completely
26
+	suppress {
27
+		User-Password
28
+	}
29
+}
30
+
31
+#
32
+#  This module logs authentication reply packets sent
33
+#  to a NAS.  Both Access-Accept and Access-Reject packets
34
+#  are logged.
35
+#
36
+#  You will also need to un-comment the 'reply_log' line
37
+#  in the 'post-auth' section, below.
38
+#
39
+detail reply_log {
40
+	detailfile = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/reply-detail-%Y%m%d
41
+
42
+	detailperm = 0600
43
+}
44
+
45
+#
46
+#  This module logs packets proxied to a home server.
47
+#
48
+#  You will also need to un-comment the 'pre_proxy_log' line
49
+#  in the 'pre-proxy' section, below.
50
+#
51
+detail pre_proxy_log {
52
+	detailfile = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/pre-proxy-detail-%Y%m%d
53
+
54
+	#
55
+	#  This MUST be 0600, otherwise anyone can read
56
+	#  the users passwords!
57
+	detailperm = 0600
58
+
59
+	# You may also strip out passwords completely
60
+	#suppress {
61
+		# User-Password
62
+	#}
63
+}
64
+
65
+#
66
+#  This module logs response packets from a home server.
67
+#
68
+#  You will also need to un-comment the 'post_proxy_log' line
69
+#  in the 'post-proxy' section, below.
70
+#
71
+detail post_proxy_log {
72
+	detailfile = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/post-proxy-detail-%Y%m%d
73
+
74
+	detailperm = 0600
75
+}

+ 33
- 0
freeradius/config/tmp/freeradius/modules/dhcp_sqlippool View File

@@ -0,0 +1,33 @@
1
+##  Configuration for DHCP to use SQL IP Pools.
2
+##
3
+##  See sqlippool.conf for common configuration explanation
4
+##
5
+##  $Id: 39358b222d016d62e5cf6e8c77fd214cc7614feb $
6
+
7
+sqlippool dhcp_sqlippool {
8
+	sql-instance-name = "sql"
9
+
10
+	ippool_table = "radippool"
11
+
12
+	lease-duration = 7200
13
+
14
+	# Client's MAC address is mapped to Calling-Station-Id in policy.conf
15
+	pool-key = "%{Calling-Station-Id}"
16
+
17
+	# For now, it only works with MySQL. 
18
+	# This line is commented by default to enable clean startup when you
19
+	# don't have freeradius-mysql installed. Uncomment this line if you 
20
+	# use this module.
21
+	#$INCLUDE ${confdir}/sql/mysql/ippool-dhcp.conf
22
+ 
23
+	sqlippool_log_exists = "DHCP: Existing IP: %{reply:Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
24
+
25
+	sqlippool_log_success = "DHCP: Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
26
+
27
+	sqlippool_log_clear = "DHCP: Released IP %{Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"
28
+
29
+	sqlippool_log_failed = "DHCP: IP Allocation FAILED from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
30
+
31
+	sqlippool_log_nopool = "DHCP: No Pool-Name defined (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
32
+
33
+}

+ 13
- 0
freeradius/config/tmp/freeradius/modules/digest View File

@@ -0,0 +1,13 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: f0aa9edf9da33d63fe03e7d1ed3cbca848eec54d $
4
+
5
+#
6
+#  The 'digest' module currently has no configuration.
7
+#
8
+#  "Digest" authentication against a Cisco SIP server.
9
+#  See 'doc/rfc/draft-sterman-aaa-sip-00.txt' for details
10
+#  on performing digest authentication for Cisco SIP servers.
11
+#
12
+digest {
13
+}

+ 32
- 0
freeradius/config/tmp/freeradius/modules/dynamic_clients View File

@@ -0,0 +1,32 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: bf047be5c7b48f2f021981a6abf4199d888fc3ee $
4
+
5
+# This module loads RADIUS clients as needed, rather than when the server
6
+# starts.
7
+#
8
+#  There are no configuration entries for this module.  Instead, it
9
+#  relies on the "client" configuration.  You must:
10
+#
11
+#	1) link raddb/sites-enabled/dyanmic_clients to
12
+#	   raddb/sites-available/dyanmic_clients
13
+#
14
+#	2) Define a client network/mask (see top of the above file)
15
+#
16
+#	3) uncomment the "directory" entry in that client definition
17
+#
18
+#	4) list "dynamic_clients" in the "authorize" section of the
19
+#	   "dynamic_clients' virtual server.  The default example already
20
+#	   does this.
21
+#
22
+#	5) put files into the above directory, one per IP.
23
+#	   e.g. file "192.168.1.1" should contain a normal client definition
24
+#	   for a client with IP address 192.168.1.1.
25
+#
26
+#  For more documentation, see the file:
27
+#
28
+#	raddb/sites-available/dynamic-clients 
29
+#
30
+dynamic_clients {
31
+
32
+}

+ 123
- 0
freeradius/config/tmp/freeradius/modules/echo View File

@@ -0,0 +1,123 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 0ca6bd8d27c25bf4f84fd27f97323b8961814d77 $
4
+
5
+#
6
+#  This is a more general example of the execute module.
7
+#
8
+#  This one is called "echo".
9
+#
10
+#  Attribute-Name = `%{echo:/path/to/program args}`
11
+#
12
+#  If you wish to execute an external program in more than
13
+#  one section (e.g. 'authorize', 'pre_proxy', etc), then it
14
+#  is probably best to define a different instance of the
15
+#  'exec' module for every section.	
16
+#
17
+#  The return value of the program run determines the result
18
+#  of the exec instance call as follows:
19
+#  (See doc/configurable_failover for details)
20
+#
21
+#  < 0 : fail      the module failed
22
+#  = 0 : ok        the module succeeded
23
+#  = 1 : reject    the module rejected the user
24
+#  = 2 : fail      the module failed
25
+#  = 3 : ok        the module succeeded
26
+#  = 4 : handled   the module has done everything to handle the request
27
+#  = 5 : invalid   the user's configuration entry was invalid
28
+#  = 6 : userlock  the user was locked out
29
+#  = 7 : notfound  the user was not found
30
+#  = 8 : noop      the module did nothing
31
+#  = 9 : updated   the module updated information in the request
32
+#  > 9 : fail      the module failed
33
+#
34
+exec echo {
35
+	#
36
+	#  Wait for the program to finish.
37
+	#
38
+	#  If we do NOT wait, then the program is "fire and
39
+	#  forget", and any output attributes from it are ignored.
40
+	#
41
+	#  If we are looking for the program to output
42
+	#  attributes, and want to add those attributes to the
43
+	#  request, then we MUST wait for the program to
44
+	#  finish, and therefore set 'wait=yes'
45
+	#
46
+	# allowed values: {no, yes}
47
+	wait = yes
48
+
49
+	#
50
+	#  The name of the program to execute, and it's
51
+	#  arguments.  Dynamic translation is done on this
52
+	#  field, so things like the following example will
53
+	#  work.
54
+	#
55
+	program = "/bin/echo %{User-Name}"
56
+
57
+	#
58
+	#  The attributes which are placed into the
59
+	#  environment variables for the program.
60
+	#
61
+	#  Allowed values are:
62
+	#
63
+	#	request		attributes from the request
64
+	#	config		attributes from the configuration items list
65
+	#	reply		attributes from the reply
66
+	#	proxy-request	attributes from the proxy request
67
+	#	proxy-reply	attributes from the proxy reply
68
+	#
69
+	#  Note that some attributes may not exist at some
70
+	#  stages.  e.g. There may be no proxy-reply
71
+	#  attributes if this module is used in the
72
+	#  'authorize' section.
73
+	#
74
+	input_pairs = request
75
+
76
+	#
77
+	#  Where to place the output attributes (if any) from
78
+	#  the executed program.  The values allowed, and the
79
+	#  restrictions as to availability, are the same as
80
+	#  for the input_pairs.
81
+	#
82
+	output_pairs = reply
83
+
84
+	#
85
+	#  When to execute the program.  If the packet
86
+	#  type does NOT match what's listed here, then
87
+	#  the module does NOT execute the program.
88
+	#
89
+	#  For a list of allowed packet types, see
90
+	#  the 'dictionary' file, and look for VALUEs
91
+	#  of the Packet-Type attribute.
92
+	#
93
+	#  By default, the module executes on ANY packet.
94
+	#  Un-comment out the following line to tell the
95
+	#  module to execute only if an Access-Accept is
96
+	#  being sent to the NAS.
97
+	#
98
+	#packet_type = Access-Accept
99
+
100
+	#
101
+	#  Should we escape the environment variables?
102
+	#  
103
+	#  If this is set, all the RADIUS attributes
104
+	#  are capitalised and dashes replaced with
105
+	#  underscores. Also, RADIUS values are surrounded
106
+	#  with double-quotes.
107
+	#
108
+	#  That is to say: User-Name=BobUser => USER_NAME="BobUser"
109
+	shell_escape = yes
110
+
111
+
112
+	#
113
+	#  How long should we wait for the program to finish?
114
+	#
115
+	#  Default is 10 seconds, which should be plenty for nearly
116
+	#  anything. Range is 1 to 30 seconds. You are strongly
117
+	#  encouraged to NOT increase this value. Decreasing can
118
+	#  be used to cause authentication to fail sooner when you
119
+	#  know it's going to fail anyway due to the time taken,
120
+	#  thereby saving resources.
121
+	#
122
+	#timeout = 10
123
+}

+ 28
- 0
freeradius/config/tmp/freeradius/modules/etc_group View File

@@ -0,0 +1,28 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 614c52b82b3e12fab54313aecb5c1120559781f3 $
4
+
5
+#  "passwd" configuration, for the /etc/group file. Adds a Etc-Group-Name
6
+#  attribute for every group that the user is member of.
7
+#
8
+#  You will have to define the Etc-Group-Name in the 'dictionary' file
9
+#  as a 'string' type.
10
+#
11
+#  The Group and Group-Name attributes are automatically created by
12
+#  the Unix module, and do checking against /etc/group automatically.
13
+#  This means that you CANNOT use Group or Group-Name to do any other
14
+#  kind of grouping in the server.  You MUST define a new group
15
+#  attribute.
16
+#
17
+#  i.e. this module should NOT be used as-is, but should be edited to
18
+#  point to a different group file.
19
+#
20
+passwd etc_group {
21
+	filename = /etc/group
22
+	format = "=Etc-Group-Name:::*,User-Name"
23
+	hashsize = 50
24
+	ignorenislike = yes
25
+	allowmultiplekeys = yes
26
+	delimiter = ":"
27
+}
28
+

+ 30
- 0
freeradius/config/tmp/freeradius/modules/exec View File

@@ -0,0 +1,30 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 5f21e4350f091ed51813865a31b2796c4b487f9f $
4
+
5
+#
6
+#  Execute external programs
7
+#
8
+#  This module is useful only for 'xlat'.  To use it,
9
+#  put 'exec' into the 'instantiate' section.  You can then
10
+#  do dynamic translation of attributes like:
11
+#
12
+#  Attribute-Name = `%{exec:/path/to/program args}`
13
+#
14
+#  The value of the attribute will be replaced with the output
15
+#  of the program which is executed.  Due to RADIUS protocol
16
+#  limitations, any output over 253 bytes will be ignored.
17
+#
18
+#  The RADIUS attributes from the user request will be placed
19
+#  into environment variables of the executed program, as
20
+#  described in "man unlang" and in doc/variables.txt
21
+#
22
+#  See also "echo" for more sample configuration.
23
+#
24
+exec {
25
+	wait = no
26
+	input_pairs = request
27
+	shell_escape = yes
28
+	output = none
29
+	timeout = 10
30
+}

+ 19
- 0
freeradius/config/tmp/freeradius/modules/expiration View File

@@ -0,0 +1,19 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 8bbd88973459d82f3967135c66a5b566fffc130a $
4
+
5
+#
6
+# The expiration module. This handles the Expiration attribute
7
+# It should be included in the *end* of the authorize section
8
+# in order to handle user Expiration. It should also be included
9
+# in the instantiate section in order to register the Expiration
10
+# compare function
11
+#
12
+expiration {
13
+	#
14
+	# The Reply-Message which will be sent back in case the
15
+	# account has expired. Dynamic substitution is supported
16
+	#
17
+	reply-message = "Password Has Expired\r\n" 
18
+	#reply-message = "Your account has expired, %{User-Name}\r\n"
19
+}

+ 20
- 0
freeradius/config/tmp/freeradius/modules/expr View File

@@ -0,0 +1,20 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 6caeb9bccb3310d76f0c527afa58d10432359ee5 $
4
+
5
+#
6
+#  The 'expression' module currently has no configuration.
7
+#
8
+#  This module is useful only for 'xlat'.  To use it,
9
+#  put 'expr' into the 'instantiate' section.  You can then
10
+#  do dynamic translation of attributes like:
11
+#
12
+#  Attribute-Name = `%{expr:2 + 3 + %{exec: uid -u}}`
13
+#
14
+#  The value of the attribute will be replaced with the output
15
+#  of the program which is executed.  Due to RADIUS protocol
16
+#  limitations, any output over 253 bytes will be ignored.
17
+#
18
+#  The module also registers a few paircompare functions
19
+expr {
20
+}

+ 46
- 0
freeradius/config/tmp/freeradius/modules/files View File

@@ -0,0 +1,46 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: e0198d85b2d14fa7b75b0e8c1bf6427c4bd89058 $
4
+
5
+# Livingston-style 'users' file
6
+#
7
+files {
8
+	# The default key attribute to use for matches.  The content
9
+	# of this attribute is used to match the "name" of the
10
+	# entry.
11
+	#key = "%{%{Stripped-User-Name}:-%{User-Name}}"
12
+
13
+	usersfile = ${confdir}/users
14
+	acctusersfile = ${confdir}/acct_users
15
+	preproxy_usersfile = ${confdir}/preproxy_users
16
+
17
+	#  If you want to use the old Cistron 'users' file
18
+	#  with FreeRADIUS, you should change the next line
19
+	#  to 'compat = cistron'.  You can the copy your 'users'
20
+	#  file from Cistron.
21
+	compat = no
22
+}
23
+
24
+#  An example which defines a second instance of the "files" module.
25
+#  This instance is named "second_files".  In order for it to be used
26
+#  in a virtual server, it needs to be listed as "second_files"
27
+#  inside of the "authorize" section (or other section).  If you just
28
+#  list "files", that will refer to the configuration defined above.
29
+#
30
+
31
+#  The two names here mean:
32
+#	"files" - this is a configuration for the "rlm_files" module
33
+#	"second_files" - this is a named configuration, which isn't
34
+#			the default configuration.
35
+files second_files {
36
+	#key = "%{%{Stripped-User-Name}:-%{User-Name}}"
37
+
38
+	#  The names here don't matter.  They just need to be different
39
+	#  from the names for the "files" configuration above.  If they
40
+	#  are the same, then this configuration will end up being the
41
+	#  same as the one above.
42
+	usersfile = ${confdir}/second_users
43
+	acctusersfile = ${confdir}/second_acct_users
44
+	preproxy_usersfile = ${confdir}/second_preproxy_users
45
+}
46
+

+ 161
- 0
freeradius/config/tmp/freeradius/modules/inner-eap View File

@@ -0,0 +1,161 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 0a26c9c1672823e46219d831e2be18890450c2a7 $
4
+
5
+#
6
+#  Sample configuration for an EAP module that occurs *inside*
7
+#  of a tunneled method.  It is used to limit the EAP types that
8
+#  can occur inside of the inner tunnel.
9
+#
10
+#  See also raddb/sites-available/inner-tunnel
11
+#
12
+#  To use this module, edit raddb/sites-available/inner-tunnel, and
13
+#  replace the references to "eap" with "inner-eap".
14
+#
15
+#  See raddb/eap.conf for full documentation on the meaning of the
16
+#  configuration entries here.
17
+#
18
+eap inner-eap {
19
+	# This is the best choice for PEAP.
20
+	default_eap_type = mschapv2
21
+	timer_expire     = 60
22
+
23
+	#  This should be the same as the outer eap "max sessions"
24
+	max_sessions = 2048
25
+
26
+	# Supported EAP-types
27
+	md5 {
28
+	}
29
+
30
+	gtc {
31
+		#  The default challenge, which many clients
32
+		#  ignore..
33
+		#challenge = "Password: "
34
+
35
+		auth_type = PAP
36
+	}
37
+
38
+	mschapv2 {
39
+	}
40
+
41
+	# No TTLS or PEAP configuration should be listed here.
42
+
43
+	## EAP-TLS
44
+	#
45
+	#  You SHOULD use different certificates than are used
46
+	#  for the outer EAP configuration!
47
+	#
48
+	#  Support for PEAP/TLS and RFC 5176 TLS/TLS is experimental.
49
+	#
50
+	tls {
51
+		#
52
+		#  These is used to simplify later configurations.
53
+		#
54
+		certdir = ${confdir}/certs
55
+		cadir = ${confdir}/certs
56
+
57
+		private_key_password = whatever
58
+		private_key_file = ${certdir}/server.pem
59
+
60
+		#  If Private key & Certificate are located in
61
+		#  the same file, then private_key_file &
62
+		#  certificate_file must contain the same file
63
+		#  name.
64
+		#
65
+		#  If CA_file (below) is not used, then the
66
+		#  certificate_file below MUST include not
67
+		#  only the server certificate, but ALSO all
68
+		#  of the CA certificates used to sign the
69
+		#  server certificate.
70
+		certificate_file = ${certdir}/server.pem
71
+
72
+		#  Trusted Root CA list
73
+		#
74
+		#  ALL of the CA's in this list will be trusted
75
+		#  to issue client certificates for authentication.
76
+		#
77
+		#  In general, you should use self-signed
78
+		#  certificates for 802.1x (EAP) authentication.
79
+		#  In that case, this CA file should contain
80
+		#  *one* CA certificate.
81
+		#
82
+		#  This parameter is used only for EAP-TLS,
83
+		#  when you issue client certificates.  If you do
84
+		#  not use client certificates, and you do not want
85
+		#  to permit EAP-TLS authentication, then delete
86
+		#  this configuration item.
87
+		CA_file = ${cadir}/ca.pem
88
+
89
+		#
90
+		#  For DH cipher suites to work, you have to
91
+		#  run OpenSSL to create the DH file first:
92
+		#
93
+		#  	openssl dhparam -out certs/dh 1024
94
+		#
95
+		dh_file = ${certdir}/dh
96
+		random_file = ${certdir}/random
97
+
98
+		#
99
+		#  This can never exceed the size of a RADIUS
100
+		#  packet (4096 bytes), and is preferably half
101
+		#  that, to accomodate other attributes in
102
+		#  RADIUS packet.  On most APs the MAX packet
103
+		#  length is configured between 1500 - 1600
104
+		#  In these cases, fragment size should be
105
+		#  1024 or less.
106
+		#
107
+	#	fragment_size = 1024
108
+
109
+		#  include_length is a flag which is
110
+		#  by default set to yes If set to
111
+		#  yes, Total Length of the message is
112
+		#  included in EVERY packet we send.
113
+		#  If set to no, Total Length of the
114
+		#  message is included ONLY in the
115
+		#  First packet of a fragment series.
116
+		#
117
+	#	include_length = yes
118
+
119
+		#  Check the Certificate Revocation List
120
+		#
121
+		#  1) Copy CA certificates and CRLs to same directory.
122
+		#  2) Execute 'c_rehash <CA certs&CRLs Directory>'.
123
+		#    'c_rehash' is OpenSSL's command.
124
+		#  3) uncomment the line below.
125
+		#  5) Restart radiusd
126
+	#	check_crl = yes
127
+	#	CA_path = /path/to/directory/with/ca_certs/and/crls/
128
+
129
+	       #
130
+	       #  If check_cert_issuer is set, the value will
131
+	       #  be checked against the DN of the issuer in
132
+	       #  the client certificate.  If the values do not
133
+	       #  match, the cerficate verification will fail,
134
+	       #  rejecting the user.
135
+	       #
136
+	#       check_cert_issuer = "/C=GB/ST=Berkshire/L=Newbury/O=My Company Ltd"
137
+
138
+	       #
139
+	       #  If check_cert_cn is set, the value will
140
+	       #  be xlat'ed and checked against the CN
141
+	       #  in the client certificate.  If the values
142
+	       #  do not match, the certificate verification
143
+	       #  will fail rejecting the user.
144
+	       #
145
+	       #  This check is done only if the previous
146
+	       #  "check_cert_issuer" is not set, or if
147
+	       #  the check succeeds.
148
+	       #
149
+	#	check_cert_cn = %{User-Name}
150
+	#
151
+		# Set this option to specify the allowed
152
+		# TLS cipher suites.  The format is listed
153
+		# in "man 1 ciphers".
154
+		cipher_list = "DEFAULT"
155
+
156
+		#
157
+		#  The session resumption / fast reauthentication
158
+		#  cache CANNOT be used for inner sessions.
159
+		#
160
+	}
161
+}

+ 75
- 0
freeradius/config/tmp/freeradius/modules/ippool View File

@@ -0,0 +1,75 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 05561cf37fe71142adc97410daba3ae08a1cb68c $
4
+
5
+#  Do server side ip pool management. Should be added in
6
+#  post-auth and accounting sections.
7
+#
8
+#  The module also requires the existance of the Pool-Name
9
+#  attribute. That way the administrator can add the Pool-Name
10
+#  attribute in the user profiles and use different pools for
11
+#  different users. The Pool-Name attribute is a *check* item
12
+#  not a reply item.
13
+#
14
+#  The Pool-Name should be set to the ippool module instance
15
+#  name or to DEFAULT to match any module.
16
+
17
+#
18
+# Example:
19
+# radiusd.conf: ippool students { [...] }
20
+#		ippool teachers { [...] }
21
+# users file  : DEFAULT Group == students, Pool-Name := "students"
22
+#		DEFAULT Group == teachers, Pool-Name := "teachers"
23
+#		DEFAULT	Group == other, Pool-Name := "DEFAULT"
24
+#
25
+# ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST *********
26
+# ********* THEN ERASE THE DB FILES                     *********
27
+#
28
+ippool main_pool {
29
+
30
+	#  range-start,range-stop:
31
+	#	The start and end ip addresses for this pool.
32
+	range-start = 192.168.1.1
33
+	range-stop = 192.168.3.254
34
+
35
+	#  netmask:
36
+	#	The network mask used for this pool.
37
+	netmask = 255.255.255.0
38
+
39
+	#  cache-size:
40
+	#	The gdbm cache size for the db files. Should
41
+	#	be equal to the number of ip's available in
42
+	#	the ip pool
43
+	cache-size = 800
44
+
45
+	# session-db:
46
+	#	The main db file used to allocate addresses.
47
+	session-db = ${db_dir}/db.ippool
48
+
49
+	# ip-index:
50
+	#	Helper db index file used in multilink
51
+	ip-index = ${db_dir}/db.ipindex
52
+
53
+	# override:
54
+	#	If set, the Framed-IP-Address already in the
55
+	#	reply (if any) will be discarded, and replaced
56
+	#	with a Framed-IP-Address assigned here.
57
+	override = no
58
+
59
+	# maximum-timeout:
60
+	#	Specifies the maximum time in seconds that an
61
+	#	entry may be active.  If set to zero, means
62
+	#	"no timeout".  The default value is 0
63
+	maximum-timeout = 0
64
+
65
+	# key:
66
+	#	The key to use for the session database (which
67
+	#	holds the allocated ip's) normally it should
68
+	#	just be the nas ip/port (which is the default).
69
+	#
70
+	#	If your NAS sends the same value of NAS-Port
71
+	#	all requests, the key should be based on some
72
+	#	other attribute that is in ALL requests, AND
73
+	#	is unique to each machine needing an IP address.
74
+	#key = "%{NAS-IP-Address} %{NAS-Port}"
75
+}

+ 11
- 0
freeradius/config/tmp/freeradius/modules/krb5 View File

@@ -0,0 +1,11 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 81d1cf2cad2c5dd919acdc993f4484673d80121e $
4
+
5
+#
6
+#  Kerberos.  See doc/rlm_krb5 for minimal docs.
7
+#
8
+krb5 {
9
+	keytab = /path/to/keytab
10
+	service_principal = name_of_principle
11
+}

+ 197
- 0
freeradius/config/tmp/freeradius/modules/ldap View File

@@ -0,0 +1,197 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: d13892634e4a8458c942ce170f59f98521dce500 $
4
+
5
+# Lightweight Directory Access Protocol (LDAP)
6
+#
7
+#  This module definition allows you to use LDAP for
8
+#  authorization and authentication.
9
+#
10
+#  See raddb/sites-available/default for reference to the
11
+#  ldap module in the authorize and authenticate sections.
12
+#
13
+#  However, LDAP can be used for authentication ONLY when the
14
+#  Access-Request packet contains a clear-text User-Password
15
+#  attribute.  LDAP authentication will NOT work for any other
16
+#  authentication method.
17
+#
18
+#  This means that LDAP servers don't understand EAP.  If you
19
+#  force "Auth-Type = LDAP", and then send the server a
20
+#  request containing EAP authentication, then authentication
21
+#  WILL NOT WORK.
22
+#
23
+#  The solution is to use the default configuration, which does
24
+#  work.
25
+#
26
+#  Setting "Auth-Type = LDAP" is ALMOST ALWAYS WRONG.  We
27
+#  really can't emphasize this enough.
28
+#	
29
+ldap {
30
+	#
31
+	#  Note that this needs to match the name in the LDAP
32
+	#  server certificate, if you're using ldaps.
33
+	server = "ldap.your.domain"
34
+	#identity = "cn=admin,o=My Org,c=UA"
35
+	#password = mypass
36
+	basedn = "o=My Org,c=UA"
37
+	filter = "(uid=%{%{Stripped-User-Name}:-%{User-Name}})"
38
+	#base_filter = "(objectclass=radiusprofile)"
39
+
40
+	#  How many connections to keep open to the LDAP server.
41
+	#  This saves time over opening a new LDAP socket for
42
+	#  every authentication request.
43
+	ldap_connections_number = 5
44
+
45
+	#  How many times the connection can be used before
46
+	#  being re-established. This is useful for things
47
+	#  like load balancers, which may exhibit sticky
48
+	#  behaviour without it. (0) is unlimited.
49
+	max_uses = 0
50
+
51
+	#  Port to connect on, defaults to 389. Setting this to
52
+	#  636 will enable LDAPS if start_tls (see below) is not
53
+	#  able to be used.
54
+	#port = 389
55
+
56
+	# seconds to wait for LDAP query to finish. default: 20
57
+	timeout = 4
58
+
59
+	#  seconds LDAP server has to process the query (server-side
60
+	#  time limit). default: 20
61
+	#
62
+	#  LDAP_OPT_TIMELIMIT is set to this value.
63
+	timelimit = 3
64
+
65
+	#
66
+	#  seconds to wait for response of the server. (network
67
+	#   failures) default: 10
68
+	#
69
+	#  LDAP_OPT_NETWORK_TIMEOUT is set to this value.
70
+	net_timeout = 1
71
+
72
+	#
73
+	#  This subsection configures the tls related items
74
+	#  that control how FreeRADIUS connects to an LDAP
75
+	#  server.  It contains all of the "tls_*" configuration
76
+	#  entries used in older versions of FreeRADIUS.  Those
77
+	#  configuration entries can still be used, but we recommend
78
+	#  using these.
79
+	#
80
+	tls {
81
+		# Set this to 'yes' to use TLS encrypted connections
82
+		# to the LDAP database by using the StartTLS extended
83
+		# operation.
84
+		#			
85
+		# The StartTLS operation is supposed to be
86
+		# used with normal ldap connections instead of
87
+		# using ldaps (port 636) connections
88
+		start_tls = no
89
+
90
+		# cacertfile	= /path/to/cacert.pem
91
+		# cacertdir		= /path/to/ca/dir/
92
+		# certfile		= /path/to/radius.crt
93
+		# keyfile		= /path/to/radius.key
94
+		# randfile		= /path/to/rnd
95
+
96
+		#  Certificate Verification requirements.  Can be:
97
+		#    "never" (don't even bother trying)
98
+		#    "allow" (try, but don't fail if the cerificate
99
+		#		can't be verified)
100
+		#    "demand" (fail if the certificate doesn't verify.)
101
+		#
102
+		#	The default is "allow"
103
+		# require_cert	= "demand"
104
+	}
105
+
106
+	# default_profile = "cn=radprofile,ou=dialup,o=My Org,c=UA"
107
+	# profile_attribute = "radiusProfileDn"
108
+	# access_attr = "dialupAccess"
109
+
110
+	# Mapping of RADIUS dictionary attributes to LDAP
111
+	# directory attributes.
112
+	dictionary_mapping = ${confdir}/ldap.attrmap
113
+
114
+	#  Set password_attribute = nspmPassword to get the
115
+	#  user's password from a Novell eDirectory
116
+	#  backend. This will work ONLY IF FreeRADIUS has been
117
+	#  built with the --with-edir configure option.
118
+	#
119
+	#  See also the following links:
120
+	#
121
+	#  http://www.novell.com/coolsolutions/appnote/16745.html
122
+	#  https://secure-support.novell.com/KanisaPlatform/Publishing/558/3009668_f.SAL_Public.html
123
+	#
124
+	#  Novell may require TLS encrypted sessions before returning
125
+	#  the user's password.
126
+	#
127
+	# password_attribute = userPassword
128
+
129
+	#  Un-comment the following to disable Novell
130
+	#  eDirectory account policy check and intruder
131
+	#  detection. This will work *only if* FreeRADIUS is
132
+	#  configured to build with --with-edir option.
133
+	#
134
+	edir_account_policy_check = no
135
+
136
+	#
137
+	#  Group membership checking.  Disabled by default.
138
+	#
139
+	# groupname_attribute = cn
140
+	# groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{control:Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{control:Ldap-UserDn})))"
141
+	# groupmembership_attribute = radiusGroupName
142
+
143
+	# compare_check_items = yes
144
+	# do_xlat = yes
145
+	# access_attr_used_for_allow = yes
146
+
147
+	#
148
+	#  The following two configuration items are for Active Directory
149
+	#  compatibility.  If you see the helpful "operations error"
150
+	#  being returned to the LDAP module, uncomment the next
151
+	#  two lines.
152
+	#
153
+	# chase_referrals = yes
154
+	# rebind = yes
155
+
156
+	#
157
+	#  By default, if the packet contains a User-Password,
158
+	#  and no other module is configured to handle the
159
+	#  authentication, the LDAP module sets itself to do
160
+	#  LDAP bind for authentication.
161
+	#
162
+	#  THIS WILL ONLY WORK FOR PAP AUTHENTICATION.
163
+	#
164
+	#  THIS WILL NOT WORK FOR CHAP, MS-CHAP, or 802.1x (EAP). 
165
+	#
166
+	#  You can disable this behavior by setting the following
167
+	#  configuration entry to "no".
168
+	#
169
+	#  allowed values: {no, yes}
170
+	# set_auth_type = yes
171
+
172
+	#  ldap_debug: debug flag for LDAP SDK
173
+	#  (see OpenLDAP documentation).  Set this to enable
174
+	#  huge amounts of LDAP debugging on the screen.
175
+	#  You should only use this if you are an LDAP expert.
176
+	#
177
+	#	default: 0x0000 (no debugging messages)
178
+	#	Example:(LDAP_DEBUG_FILTER+LDAP_DEBUG_CONNS)
179
+	#ldap_debug = 0x0028 
180
+
181
+	#
182
+	#  Keepalive configuration.  This MAY NOT be supported by your
183
+	#  LDAP library.  If these configuration entries appear in the
184
+	#  output of "radiusd -X", then they are supported.  Otherwise,
185
+	#  they are unsupported, and changing them will do nothing.
186
+	#
187
+	keepalive {
188
+		# LDAP_OPT_X_KEEPALIVE_IDLE
189
+		idle = 60
190
+
191
+		# LDAP_OPT_X_KEEPALIVE_PROBES
192
+		probes = 3
193
+
194
+		# LDAP_OPT_X_KEEPALIVE_INTERVAL
195
+		interval = 3
196
+	}
197
+}

+ 105
- 0
freeradius/config/tmp/freeradius/modules/linelog View File

@@ -0,0 +1,105 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: a57741ac3fa5f884ed64d896da3807af5d2a6b99 $
4
+
5
+#
6
+#  The "linelog" module will log one line of text to a file.
7
+#  Both the filename and the line of text are dynamically expanded.
8
+#
9
+#  We STRONGLY suggest that you do not use data from the
10
+#  packet as part of the filename.
11
+#
12
+linelog {
13
+	#
14
+	#  The file where the logs will go.
15
+	#
16
+	#  If the filename is "syslog", then the log messages will
17
+	#  go to syslog.
18
+	filename = ${logdir}/linelog
19
+
20
+	#
21
+	#  The Unix-style permissions on the log file.
22
+	#
23
+	#  Depending on format string, the log file may contain secret or
24
+	#  private information about users.  Keep the file permissions as
25
+	#  restrictive as possible.
26
+	permissions = 0600
27
+
28
+	#
29
+	# The Unix group of the log file.
30
+	#
31
+	# The user that freeradius runs as must be in the specified
32
+	# group, otherwise it will not be possible to set the group.
33
+	#
34
+	# group = freerad
35
+
36
+	#
37
+	# If logging via syslog, the facility can be set here. Otherwise
38
+	# the syslog_facility option in radiusd.conf will be used.
39
+	#
40
+	# syslog_facility = daemon
41
+
42
+	#
43
+	#  The default format string.
44
+	format = "This is a log message for %{User-Name}"
45
+
46
+	#
47
+	#  This next line can be omitted.  If it is omitted, then
48
+	#  the log message is static, and is always given by "format",
49
+	#  above.
50
+	#
51
+	#  If it is defined, then the string is dynamically expanded,
52
+	#  and the result is used to find another configuration entry
53
+	#  here, with the given name.  That name is then used as the
54
+	#  format string.
55
+	#
56
+	#  If the configuration entry cannot be found, then no log
57
+	#  message is printed.
58
+	#
59
+	#  i.e. You can have many log messages in one "linelog" module.
60
+	#  If this two-step expansion did not exist, you would have
61
+	#  needed to configure one "linelog" module for each log message.
62
+
63
+	#
64
+	#  Reference the Packet-Type (Access-Request, etc.)  If it doesn't
65
+	#  exist, reference the "format" entry, above.
66
+	reference = "%{%{Packet-Type}:-format}"
67
+
68
+	#
69
+	#  Followed by a series of log messages.
70
+	Access-Request = "Requested access: %{User-Name}"
71
+	Access-Reject = "Rejected access: %{User-Name}"
72
+	Access-Challenge = "Sent challenge: %{User-Name}"
73
+
74
+	#
75
+	#  The log messages can be grouped into sections and
76
+        #  sub-sections, too.  The "reference" item needs to have a "."
77
+	#  for every section.  e.g. reference = foo.bar will reference
78
+	#  the "foo" section, "bar" configuration item.
79
+	#
80
+
81
+	#
82
+	#  Used if:	reference = "foo.bar".
83
+	foo {
84
+	    bar = "Example log.  Please ignore"
85
+	}
86
+
87
+	#
88
+	#  Another example:
89
+	#      reference = "Accounting-Request.%{%{Acct-Status-Type}:-unknown}"
90
+	#
91
+	Accounting-Request {
92
+		Start = "Connect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address})"
93
+		Stop = "Disconnect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address}) %{Acct-Session-Time} seconds"
94
+
95
+		#  Don't log anything for these packets.
96
+		Alive = ""
97
+
98
+		Accounting-On = "NAS %C (%{NAS-IP-Address}) just came online"
99
+		Accounting-Off = "NAS %C (%{NAS-IP-Address}) just went offline"
100
+
101
+		# don't log anything for other Acct-Status-Types.
102
+		unknown = ""
103
+	}
104
+
105
+}

+ 31
- 0
freeradius/config/tmp/freeradius/modules/logintime View File

@@ -0,0 +1,31 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 26691a93664c464f49394773e04d3b2ed565d142 $
4
+
5
+# The logintime module. This handles the Login-Time,
6
+# Current-Time, and Time-Of-Day attributes.  It should be
7
+# included in the *end* of the authorize section in order to
8
+# handle Login-Time checks. It should also be included in the
9
+# instantiate section in order to register the Current-Time
10
+# and Time-Of-Day comparison functions.
11
+#
12
+# When the Login-Time attribute is set to some value, and the
13
+# user has bene permitted to log in, a Session-Timeout is
14
+# calculated based on the remaining time.  See "doc/README".
15
+#
16
+logintime {
17
+	#
18
+	# The Reply-Message which will be sent back in case
19
+	# the account is calling outside of the allowed
20
+	# timespan. Dynamic substitution is supported.
21
+	#
22
+	reply-message = "You are calling outside your allowed timespan\r\n"
23
+	#reply-message = "Outside allowed timespan (%{control:Login-Time}), %{User-Name}\r\n"
24
+
25
+	# The minimum timeout (in seconds) a user is allowed
26
+	# to have. If the calculated timeout is lower we don't
27
+	# allow the logon. Some NASes do not handle values
28
+	# lower than 60 seconds well.
29
+	minimum-timeout = 60
30
+}
31
+

+ 25
- 0
freeradius/config/tmp/freeradius/modules/mac2ip View File

@@ -0,0 +1,25 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 793d5690e1d4520bb3db1d9900d6be09da2587ae $
4
+
5
+######################################################################
6
+#
7
+#  This next section is a sample configuration for the "passwd"
8
+#  module, that reads flat-text files.
9
+#
10
+#  The file is in the format <mac>,<ip>
11
+#
12
+#	00:01:02:03:04:05,192.168.1.100
13
+#	01:01:02:03:04:05,192.168.1.101
14
+#	02:01:02:03:04:05,192.168.1.102
15
+#
16
+#  This lets you perform simple static IP assignments from a flat-text
17
+#  file.  You will have to define lease times yourself.
18
+#
19
+######################################################################
20
+
21
+passwd mac2ip {
22
+	filename = ${confdir}/mac2ip
23
+	format = "*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"
24
+	delimiter = ","
25
+}

+ 18
- 0
freeradius/config/tmp/freeradius/modules/mac2vlan View File

@@ -0,0 +1,18 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: bdfef238076bb1ea16c494bf6e22f1d2af848b62 $
4
+
5
+#  A simple file to map a MAC address to a VLAN.
6
+#
7
+#  The file should be in the format MAC,VLAN
8
+#  the VLAN name cannot have spaces in it, for example:
9
+#
10
+#	00:01:02:03:04:05,VLAN1
11
+#	03:04:05:06:07:08,VLAN2
12
+#	...
13
+#
14
+passwd mac2vlan {
15
+	filename = ${confdir}/mac2vlan
16
+	format = "*VMPS-Mac:=VMPS-VLAN-Name"
17
+	delimiter = ","
18
+}

+ 87
- 0
freeradius/config/tmp/freeradius/modules/mschap View File

@@ -0,0 +1,87 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 9e016a09a158f55bbc9b48876f0cb2b776b4cd96 $
4
+
5
+# Microsoft CHAP authentication
6
+#
7
+#  This module supports MS-CHAP and MS-CHAPv2 authentication.
8
+#  It also enforces the SMB-Account-Ctrl attribute.
9
+#
10
+mschap {
11
+	#
12
+	#  If you are using /etc/smbpasswd, see the 'passwd'
13
+	#  module for an example of how to use /etc/smbpasswd
14
+
15
+	# if use_mppe is not set to no mschap will
16
+	# add MS-CHAP-MPPE-Keys for MS-CHAPv1 and
17
+	# MS-MPPE-Recv-Key/MS-MPPE-Send-Key for MS-CHAPv2
18
+	#
19
+	use_mppe = yes
20
+
21
+	# if mppe is enabled require_encryption makes
22
+	# encryption moderate
23
+	#
24
+	require_encryption = yes
25
+
26
+	# require_strong always requires 128 bit key
27
+	# encryption
28
+	#
29
+	require_strong = yes
30
+
31
+	# Windows sends us a username in the form of
32
+	# DOMAIN\user, but sends the challenge response
33
+	# based on only the user portion.  This hack
34
+	# corrects for that incorrect behavior.
35
+	#
36
+#	with_ntdomain_hack = no
37
+
38
+	# The module can perform authentication itself, OR
39
+	# use a Windows Domain Controller.  This configuration
40
+	# directive tells the module to call the ntlm_auth
41
+	# program, which will do the authentication, and return
42
+	# the NT-Key.  Note that you MUST have "winbindd" and
43
+	# "nmbd" running on the local machine for ntlm_auth
44
+	# to work.  See the ntlm_auth program documentation
45
+	# for details.
46
+	#
47
+	# If ntlm_auth is configured below, then the mschap
48
+	# module will call ntlm_auth for every MS-CHAP
49
+	# authentication request.  If there is a cleartext
50
+	# or NT hashed password available, you can set
51
+	# "MS-CHAP-Use-NTLM-Auth := No" in the control items,
52
+	# and the mschap module will do the authentication itself,
53
+	# without calling ntlm_auth.
54
+	#
55
+	# Be VERY careful when editing the following line!
56
+	#
57
+	# You can also try setting the user name as:
58
+	#
59
+	#	... --username=%{mschap:User-Name} ...
60
+	#
61
+	# In that case, the mschap module will look at the User-Name
62
+	# attribute, and do prefix/suffix checks in order to obtain
63
+	# the "best" user name for the request.
64
+	#
65
+#	ntlm_auth = "/path/to/ntlm_auth --request-nt-key --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} --challenge=%{%{mschap:Challenge}:-00} --nt-response=%{%{mschap:NT-Response}:-00}"
66
+
67
+	# The default is to wait 10 seconds for ntlm_auth to
68
+	# complete.  This is a long time, and if it's taking that
69
+	# long then you likely have other problems in your domain.
70
+	# The length of time can be decreased with the following
71
+	# option, which can save clients waiting if your ntlm_auth
72
+	# usually finishes quicker. Range 1 to 10 seconds.
73
+	#
74
+#	ntlm_auth_timeout = 10
75
+
76
+	# For Apple Server, when running on the same machine as
77
+	# Open Directory.  It has no effect on other systems.
78
+	#
79
+#	use_open_directory = yes
80
+
81
+	# On failure, set (or not) the MS-CHAP error code saying
82
+	# "retries allowed".
83
+#	allow_retry = yes
84
+
85
+	# An optional retry message.
86
+#	retry_msg = "Re-enter (or reset) the password"
87
+}

+ 12
- 0
freeradius/config/tmp/freeradius/modules/ntlm_auth View File

@@ -0,0 +1,12 @@
1
+#
2
+#  For testing ntlm_auth authentication with PAP.
3
+#
4
+#  If you have problems with authentication failing, even when the
5
+#  password is good, it may be a bug in Samba:
6
+#
7
+#	https://bugzilla.samba.org/show_bug.cgi?id=6563
8
+#
9
+exec ntlm_auth {
10
+	wait = yes
11
+	program = "/path/to/ntlm_auth --request-nt-key --domain=MYDOMAIN --username=%{mschap:User-Name} --password=%{User-Password}"
12
+}

+ 13
- 0
freeradius/config/tmp/freeradius/modules/opendirectory View File

@@ -0,0 +1,13 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 2a44ef695f4eaf6f1c461b3d92fda54e9b910f9e $
4
+
5
+#  This module is only used when the server is running on the same
6
+#  system as OpenDirectory.  The configuration of the module is hard-coded
7
+#  by Apple, and cannot be changed here.
8
+#
9
+#  There are no configuration entries for this module.
10
+#
11
+opendirectory {
12
+
13
+}

+ 78
- 0
freeradius/config/tmp/freeradius/modules/otp View File

@@ -0,0 +1,78 @@
1
+#
2
+#  Configuration for the OTP module.
3
+#
4
+
5
+#  This module allows you to use various handheld OTP tokens
6
+#  for authentication (Auth-Type := otp).  These tokens are
7
+#  available from various vendors.
8
+#
9
+#  It works in conjunction with otpd, which implements token
10
+#  management and OTP verification functions; and lsmd or gsmd,
11
+#  which implements synchronous state management functions.
12
+#  otpd, lsmd and gsmd are available from TRI-D Systems:
13
+#              <http://www.tri-dsystems.com/>
14
+
15
+#  You must list this module in BOTH the authorize and authenticate
16
+#  sections in order to use it.
17
+otp {
18
+	# otpd rendezvous point.
19
+	# (default: /var/run/otpd/socket)
20
+	#otpd_rp = /var/run/otpd/socket
21
+
22
+	# Text to use for the challenge.  The '%' character is
23
+	# disallowed, except that you MUST have a single "%s"
24
+	# sequence in the string; the challenge itself is
25
+	# inserted there.  (default "Challenge: %s\n Response: ")
26
+	#challenge_prompt = "Challenge: %s\n Response: "
27
+
28
+	# Length of the challenge.  Most tokens probably support a
29
+	# max of 8 digits.  (range: 5-32 digits, default 6)
30
+	#challenge_length = 6
31
+
32
+	# Maximum time, in seconds, that a challenge is valid.
33
+	# (The user must respond to a challenge within this time.)
34
+	# It is also the minimal time between consecutive async mode
35
+	# authentications, a necessary restriction due to an inherent
36
+	# weakness of the RADIUS protocol which allows replay attacks.
37
+	# (default: 30)
38
+	#challenge_delay = 30
39
+
40
+	# Whether or not to allow asynchronous ("pure" challenge/
41
+	# response) mode authentication.  Since sync mode is much more
42
+	# usable, and all reasonable tokens support it, the typical
43
+	# use of async mode is to allow resync of event based tokens.
44
+	# But because of the vulnerability of async mode with some tokens,
45
+	# you probably want to disable this and require that out-of-sync
46
+	# users resync from specifically secured terminals.
47
+	# See the otpd docs for more info.
48
+	# (default: no)
49
+	#allow_async = no
50
+
51
+	# Whether or not to allow synchronous mode authentication.
52
+	# When using otpd with lsmd, it is *CRITICALLY IMPORTANT*
53
+	# that if your OTP users can authenticate to multiple RADIUS
54
+	# servers, this must be "yes" for the primary/default server,
55
+	# and "no" for the others.  This is because lsmd does not
56
+	# share state information across multiple servers.  Using "yes"
57
+	# on all your RADIUS servers would allow replay attacks!
58
+	# Also, for event based tokens, the user will be out of sync
59
+	# on the "other" servers.  In order to use "yes" on all your
60
+	# servers, you must either use gsmd, which synchronizes state
61
+	# globally, or implement your own state synchronization method.
62
+	# (default: yes)
63
+	#allow_sync = yes
64
+
65
+	# If both allow_async and allow_sync are "yes", a challenge is
66
+	# always presented to the user.  This is incompatible with NAS's
67
+	# that can't present or don't handle Access-Challenge's, e.g.
68
+	# PPTP servers.  Even though a challenge is presented, the user
69
+	# can still enter their synchronous passcode.
70
+
71
+	# The following are MPPE settings.  Note that MS-CHAP (v1) is
72
+	# strongly discouraged.  All possible values are listed as
73
+	# {value = meaning}.  Default values are first.
74
+	#mschapv2_mppe = {2 = required, 1 = optional, 0 = forbidden}
75
+	#mschapv2_mppe_bits = {2 = 128, 1 = 128 or 40, 0 = 40}
76
+	#mschap_mppe = {2 = required, 1 = optional, 0 = forbidden}
77
+	#mschap_mppe_bits = {2 = 128}
78
+}

+ 26
- 0
freeradius/config/tmp/freeradius/modules/pam View File

@@ -0,0 +1,26 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: f4a91a948637bb2f42f613ed9faa6f9ae9ae6099 $
4
+
5
+
6
+# Pluggable Authentication Modules
7
+#
8
+#  For Linux, see:
9
+#	http://www.kernel.org/pub/linux/libs/pam/index.html
10
+#
11
+#  WARNING: On many systems, the system PAM libraries have
12
+#           memory leaks!  We STRONGLY SUGGEST that you do not
13
+#	    use PAM for authentication, due to those memory leaks.
14
+#
15
+pam {
16
+	#
17
+	#  The name to use for PAM authentication.
18
+	#  PAM looks in /etc/pam.d/${pam_auth_name}
19
+	#  for it's configuration.  See 'redhat/radiusd-pam'
20
+	#  for a sample PAM configuration file.
21
+	#
22
+	#  Note that any Pam-Auth attribute set in the 'authorize'
23
+	#  section will over-ride this one.
24
+	#
25
+	pam_auth = radiusd
26
+}

+ 22
- 0
freeradius/config/tmp/freeradius/modules/pap View File

@@ -0,0 +1,22 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 5c7d29d654bea9c076d6434f32795c2b2d002757 $
4
+
5
+# PAP module to authenticate users based on their stored password
6
+#
7
+#  Supports multiple encryption/hash schemes.  See "man rlm_pap"
8
+#  for details.
9
+#
10
+#  The "auto_header" configuration item can be set to "yes".
11
+#  In this case, the module will look inside of the User-Password
12
+#  attribute for the headers {crypt}, {clear}, etc., and will
13
+#  automatically create the attribute on the right-hand side,
14
+#  with the correct value.  It will also automatically handle
15
+#  Base-64 encoded data, hex strings, and binary data.
16
+#
17
+#  For instructions on creating the various types of passwords, see:
18
+#
19
+#  http://www.openldap.org/faq/data/cache/347.html
20
+pap {
21
+	auto_header = no
22
+}

+ 55
- 0
freeradius/config/tmp/freeradius/modules/passwd View File

@@ -0,0 +1,55 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: cc37ca0d7eaf9887720eccc2de0ecb75a51117c8 $
4
+
5
+# passwd module allows to do authorization via any passwd-like
6
+# file and to extract any attributes from these files.
7
+#
8
+#  See the "smbpasswd" and "etc_group" files for more examples.
9
+#
10
+# parameters are:
11
+#   filename - path to filename
12
+#
13
+#   format - format for filename record. This parameters
14
+#            correlates record in the passwd file and RADIUS
15
+#            attributes.
16
+#
17
+#            Field marked as '*' is a key field. That is, the parameter
18
+#            with this name from the request is used to search for
19
+#            the record from passwd file
20
+#
21
+#            Attributes marked as '=' are added to reply_items instead
22
+#            of default configure_itmes
23
+#
24
+#	     Attributes marked as '~' are added to request_items
25
+#
26
+#            Field marked as ',' may contain a comma separated list
27
+#            of attributes.
28
+#
29
+#   hashsize - hashtable size.  Setting it to 0 is no longer permitted
30
+#		A future version of the server will have the module
31
+#		automatically determine the hash size.  Having it set
32
+#		manually should not be necessary.
33
+#
34
+#   allowmultiplekeys - if many records for a key are allowed
35
+#
36
+#   ignorenislike - ignore NIS-related records
37
+#
38
+#   delimiter - symbol to use as a field separator in passwd file,
39
+#            for format ':' symbol is always used. '\0', '\n' are
40
+#	     not allowed 
41
+#
42
+
43
+#  An example configuration for using /etc/passwd.
44
+#
45
+#  This is an example which will NOT WORK if you have shadow passwords,
46
+#  NIS, etc.  The "unix" module is normally responsible for reading
47
+#  system passwords.  You should use it instead of this example.
48
+#
49
+passwd etc_passwd {
50
+	filename = /etc/passwd
51
+	format = "*User-Name:Crypt-Password:"
52
+	hashsize = 100
53
+	ignorenislike = no
54
+	allowmultiplekeys = no
55
+}

+ 58
- 0
freeradius/config/tmp/freeradius/modules/perl View File

@@ -0,0 +1,58 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 69ad3076119ec814518a6db45eec4bc41dc090f7 $
4
+
5
+#  Persistent, embedded Perl interpreter.
6
+#
7
+perl {
8
+	#
9
+	#  The Perl script to execute on authorize, authenticate,
10
+	#  accounting, xlat, etc.  This is very similar to using
11
+	#  'rlm_exec' module, but it is persistent, and therefore
12
+	#  faster.
13
+	#
14
+	module = ${confdir}/example.pl
15
+
16
+	#
17
+	#  The following hashes are given to the module and
18
+        #  filled with value-pairs (Attribute names and values)
19
+	#
20
+	#  %RAD_CHECK		Check items
21
+	#  %RAD_REQUEST		Attributes from the request
22
+	#  %RAD_REPLY		Attributes for the reply
23
+	# 
24
+	#  The return codes from functions in the perl_script
25
+	#  are passed directly back to the server.  These
26
+	#  codes are defined in doc/configurable_failover,
27
+	#  src/include/modules.h (RLM_MODULE_REJECT, etc),
28
+	#  and are pre-defined in the 'example.pl' program
29
+	#  which is included.
30
+	#		
31
+
32
+	#
33
+	#  List of functions in the module to call.
34
+	#  Uncomment and change if you want to use function
35
+	#  names other than the defaults.
36
+	#
37
+	#func_authenticate = authenticate
38
+	#func_authorize = authorize
39
+	#func_preacct = preacct
40
+	#func_accounting = accounting
41
+	#func_checksimul = checksimul
42
+	#func_pre_proxy = pre_proxy
43
+	#func_post_proxy = post_proxy
44
+	#func_post_auth = post_auth
45
+	#func_recv_coa = recv_coa
46
+	#func_send_coa = send_coa
47
+	#func_xlat = xlat
48
+	#func_detach = detach
49
+
50
+	#
51
+	#  Uncomment the following lines if you wish
52
+	#  to use separate functions for Start and Stop
53
+	#  accounting packets. In that case, the 
54
+	#  func_accounting function is not called.
55
+	#
56
+	#func_start_accounting = accounting_start
57
+	#func_stop_accounting = accounting_stop
58
+}

+ 21
- 0
freeradius/config/tmp/freeradius/modules/policy View File

@@ -0,0 +1,21 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 9b1b111ce70dbfd4ce25cdd2774d5878dbea7023 $
4
+
5
+#
6
+#  Module implementing a DIFFERENT policy language.
7
+#  The syntax here is NOT "unlang", but something else.
8
+#
9
+#  See the "raddb/policy.txt" file for documentation and examples.
10
+#  There isn't much else in the way of documentation, sorry.
11
+#
12
+policy {
13
+       #  The only configuration item is a filename containing
14
+       #  the policies to execute.
15
+       #
16
+       #  When "policy" is listed in a section (e.g. "authorize"),
17
+       #  it will run a policy named for that section.
18
+       # 
19
+       filename = ${confdir}/policy.txt
20
+}
21
+

+ 58
- 0
freeradius/config/tmp/freeradius/modules/preprocess View File

@@ -0,0 +1,58 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: e00aa85a9bd924b3a79c034f6f5d4d7d9a98c208 $
4
+
5
+# Preprocess the incoming RADIUS request, before handing it off
6
+# to other modules.
7
+#
8
+#  This module processes the 'huntgroups' and 'hints' files.
9
+#  In addition, it re-writes some weird attributes created
10
+#  by some NASes, and converts the attributes into a form which
11
+#  is a little more standard.
12
+#
13
+preprocess {
14
+	huntgroups = ${confdir}/huntgroups
15
+	hints = ${confdir}/hints
16
+
17
+	# This hack changes Ascend's wierd port numberings
18
+	# to standard 0-??? port numbers so that the "+" works
19
+	# for IP address assignments.
20
+	with_ascend_hack = no
21
+	ascend_channels_per_line = 23
22
+
23
+	# Windows NT machines often authenticate themselves as
24
+	# NT_DOMAIN\username
25
+	#
26
+	# If this is set to 'yes', then the NT_DOMAIN portion
27
+	# of the user-name is silently discarded.
28
+	#
29
+	# This configuration entry SHOULD NOT be used.
30
+	# See the "realms" module for a better way to handle
31
+	# NT domains.
32
+	with_ntdomain_hack = no
33
+
34
+	# Specialix Jetstream 8500 24 port access server.
35
+	#
36
+	# If the user name is 10 characters or longer, a "/"
37
+	# and the excess characters after the 10th are
38
+	# appended to the user name.
39
+	#
40
+	# If you're not running that NAS, you don't need
41
+	# this hack.
42
+	with_specialix_jetstream_hack = no
43
+
44
+	# Cisco (and Quintum in Cisco mode) sends it's VSA attributes
45
+	# with the attribute name *again* in the string, like:
46
+	#
47
+	#   H323-Attribute = "h323-attribute=value".
48
+	#
49
+	# If this configuration item is set to 'yes', then
50
+	# the redundant data in the the attribute text is stripped
51
+	# out.  The result is:
52
+	#
53
+	#  H323-Attribute = "value"
54
+	#
55
+	# If you're not running a Cisco or Quintum NAS, you don't
56
+	# need this hack.
57
+	with_cisco_vsa_hack = no
58
+}

+ 26
- 0
freeradius/config/tmp/freeradius/modules/radrelay View File

@@ -0,0 +1,26 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: dede42698a19413b524a1a68b7ea312aa8a506aa $
4
+
5
+#  Write "detail" files which can be read by radrelay.
6
+#  This module should be used only by a server which receives
7
+#  Accounting-Request packets from the network.
8
+#
9
+#  It should NOT be used in the radrelay.conf file.
10
+#
11
+#  Use it by adding "radrelay" to the "accounting" section:
12
+#
13
+#	accounting {
14
+#		...
15
+#		radrelay
16
+#		...
17
+#	}
18
+#
19
+detail radrelay {
20
+	detailfile = ${radacctdir}/detail
21
+
22
+	locking = yes
23
+
24
+	#  The other directives from the main detail module
25
+	#  can be used here, but they're not required.
26
+}

+ 53
- 0
freeradius/config/tmp/freeradius/modules/radutmp View File

@@ -0,0 +1,53 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 3ad88cde616ce041f0dcc87858950daafdd3d336 $
4
+
5
+#  Write a 'utmp' style file, of which users are currently
6
+#  logged in, and where they've logged in from.
7
+#
8
+#  This file is used mainly for Simultaneous-Use checking,
9
+#  and also 'radwho', to see who's currently logged in.
10
+#
11
+radutmp {
12
+	#  Where the file is stored.  It's not a log file,
13
+	#  so it doesn't need rotating.
14
+	#
15
+	filename = ${logdir}/radutmp
16
+
17
+	#  The field in the packet to key on for the
18
+	#  'user' name,  If you have other fields which you want
19
+	#  to use to key on to control Simultaneous-Use,
20
+	#  then you can use them here.
21
+	#
22
+	#  Note, however, that the size of the field in the
23
+	#  'utmp' data structure is small, around 32
24
+	#  characters, so that will limit the possible choices
25
+	#  of keys.
26
+	#
27
+	#  You may want instead: %{Stripped-User-Name:-%{User-Name}}
28
+	username = %{User-Name}
29
+
30
+
31
+	#  Whether or not we want to treat "user" the same
32
+	#  as "USER", or "User".  Some systems have problems
33
+	#  with case sensitivity, so this should be set to
34
+	#  'no' to enable the comparisons of the key attribute
35
+	#  to be case insensitive.
36
+	#
37
+	case_sensitive = yes
38
+
39
+	#  Accounting information may be lost, so the user MAY
40
+	#  have logged off of the NAS, but we haven't noticed.
41
+	#  If so, we can verify this information with the NAS,
42
+	#
43
+	#  If we want to believe the 'utmp' file, then this
44
+	#  configuration entry can be set to 'no'.
45
+	#
46
+	check_with_nas = yes		
47
+
48
+	# Set the file permissions, as the contents of this file
49
+	# are usually private.
50
+	perm = 0600
51
+
52
+	callerid = "yes"
53
+}

+ 46
- 0
freeradius/config/tmp/freeradius/modules/realm View File

@@ -0,0 +1,46 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 95d9f2b98de1b33346c6129aa7e88a901248cd4d $
4
+
5
+# Realm module, for proxying.
6
+#
7
+#  You can have multiple instances of the realm module to
8
+#  support multiple realm syntaxs at the same time.  The
9
+#  search order is defined by the order that the modules are listed
10
+#  in the authorize and preacct sections.
11
+#
12
+#  Four config options:
13
+#	format         -  must be "prefix" or "suffix"
14
+#			  The special cases of "DEFAULT"
15
+#			  and "NULL" are allowed, too.
16
+#	delimiter      -  must be a single character
17
+
18
+#  'realm/username'
19
+#
20
+#  Using this entry, IPASS users have their realm set to "IPASS".
21
+realm IPASS {
22
+	format = prefix
23
+	delimiter = "/"
24
+}
25
+
26
+#  'username@realm'
27
+#
28
+realm suffix {
29
+	format = suffix
30
+	delimiter = "@"
31
+}
32
+
33
+#  'username%realm'
34
+#
35
+realm realmpercent {
36
+	format = suffix
37
+	delimiter = "%"
38
+}
39
+
40
+#
41
+#  'domain\user'
42
+#
43
+realm ntdomain {
44
+	format = prefix
45
+	delimiter = "\\"
46
+}	

+ 35
- 0
freeradius/config/tmp/freeradius/modules/redis View File

@@ -0,0 +1,35 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: d7605d9888607aa6451ab24450cebfd7bc9d4437 $
4
+
5
+#
6
+#  Configuration file for the "redis" module.  This module does nothing
7
+#  Other than provide connections to a redis database, and a %{redis: ...}
8
+#  expansion.
9
+#
10
+redis {
11
+	#  Host where the redis server is located.
12
+	#  We recommend using ONLY 127.0.0.1 !
13
+	hostname = 127.0.0.1
14
+
15
+	#  The default port.
16
+	port = 6379
17
+	
18
+	#  The password used to authenticate to the server.
19
+	#  We recommend using a strong password.
20
+#	password = thisisreallysecretandhardtoguess
21
+
22
+	# The number of connections to open to the database.
23
+	num_connections = 20
24
+
25
+	# If a connection fails, retry after this time.
26
+	connect_failure_retry_delay = 60
27
+
28
+	#  Set the maximum lifetime for one connection.
29
+	#  Use 0 for "lives forever"
30
+	lifetime = 86400
31
+
32
+	#  Set the maximum queries used for one connection.
33
+	#  Use 0 for "no limit"
34
+	max_queries = 0
35
+}

+ 28
- 0
freeradius/config/tmp/freeradius/modules/rediswho View File

@@ -0,0 +1,28 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: e16550c9991a5e76a77f349cfa5b82d5163f172e $
4
+
5
+#
6
+#  Configuration file for the "rediswho" module.
7
+#
8
+rediswho {
9
+	#  How many sessions to keep track of per user.
10
+	#  If there are more than this number, older sessions are deleted.
11
+	trim-count = 15
12
+
13
+	#  Expiry time in seconds.  Any sessions which have not received
14
+	#  an update in this time will be automatically expired.
15
+	expire-time = 86400
16
+
17
+	start-insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
18
+	start-trim =   "LTRIM %{User-Name} 0 ${trim-count}"
19
+	start-expire = "EXPIRE %{User-Name} ${expire-time}"
20
+
21
+	alive-insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
22
+	alive-trim =   "LTRIM %{User-Name} 0 ${trim-count}"
23
+	alive-expire = "EXPIRE %{User-Name} ${expire-time}"
24
+
25
+	stop-insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
26
+	stop-trim =   "LTRIM %{User-Name} 0 ${trim-count}"
27
+	stop-expire = "EXPIRE %{User-Name} ${expire-time}"
28
+}

+ 40
- 0
freeradius/config/tmp/freeradius/modules/replicate View File

@@ -0,0 +1,40 @@
1
+#  Replicate packet(s) to a home server.
2
+#
3
+#  This module will open a new socket for each packet, and "clone"
4
+#  the incoming packet to the destination realm (i.e. home server).
5
+#
6
+#  Use it by setting "Replicate-To-Realm = name" in the control list,
7
+#  just like Proxy-To-Realm.  The configurations for the two attributes
8
+#  are identical.  The realm must exist, the home_server_pool must exist,
9
+#  and the home_server must exist.
10
+#
11
+#  The only difference is that the "replicate" module sends requests
12
+#  and does not expect a reply.  Any reply is ignored.
13
+#
14
+#  Both Replicate-To-Realm and Proxy-To-Realm can be used at the same time.
15
+#
16
+#  To use this module, list "replicate" in the "authorize" or
17
+#  "accounting" section.  Then, ensure that Replicate-To-Realm is set.
18
+#  The contents of the "packet" attribute list will be sent to the
19
+#  home server.  The usual load-balancing, etc. features of the home
20
+#  server will be used.
21
+#
22
+#  "radmin" can be used to mark home servers alive/dead, in order to
23
+#  enable/disable replication to specific servers.
24
+#
25
+#  Packets can be replicated to multiple destinations.  Just set
26
+#  Replicate-To-Realm multiple times.  One packet will be sent for
27
+#  each of the Replicate-To-Realm attribute in the "control" list.
28
+#
29
+#  If no packets are sent, the module returns "noop".  If at least one
30
+#  packet is sent, the module returns "ok".  If an error occurs, the
31
+#  module returns "fail"
32
+#
33
+#  Note that replication does NOT change any of the packet statistics.
34
+#  If you use "radmin" to look at the statistics for a home server,
35
+#  the replicated packets will cause NO counters to increment.  This
36
+#  is not a bug, this is how replication works.
37
+#
38
+replicate {
39
+
40
+}

+ 16
- 0
freeradius/config/tmp/freeradius/modules/smbpasswd View File

@@ -0,0 +1,16 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 74e64047302d7d8f575672617e8a213aaf5a32d3 $
4
+
5
+#  An example configuration for using /etc/smbpasswd.
6
+#
7
+#  See the "passwd" file for documentation on the configuration items
8
+#  for this module.
9
+#
10
+passwd smbpasswd {
11
+	filename = /etc/smbpasswd
12
+	format = "*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::"
13
+	hashsize = 100
14
+	ignorenislike = no
15
+	allowmultiplekeys = no
16
+}

+ 50
- 0
freeradius/config/tmp/freeradius/modules/smsotp View File

@@ -0,0 +1,50 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 0a339b4a1b9f1eafeb05992f2643497e802e2a49 $
4
+
5
+#  SMS One-time Password system.
6
+#
7
+#  This module will extend FreeRadius with a socks interface to create and
8
+#  validate One-Time-Passwords. The program for that creates the socket
9
+#  and interacts with this module is not included here.
10
+# 
11
+#  The module does not check the User-Password, this should be done with
12
+#  the "pap" module.  See the example below.
13
+#
14
+#  The module must be used in the "authorize" section to set 
15
+#  Auth-Type properly.  The first time through, the module is called
16
+#  in the "authenticate" section to authenticate the user password, and
17
+#  to send the challenge.  The second time through, it authenticates
18
+#  the response to the challenge. e.g.:
19
+#
20
+#  authorize {
21
+#	...
22
+#	smsotp
23
+#	...
24
+#  }
25
+#
26
+#  authenticate {
27
+#	...
28
+#	Auth-Type smsotp {
29
+#		pap
30
+#		smsotp
31
+#	}
32
+#
33
+#	Auth-Type smsotp-reply {
34
+#		smsotp
35
+#	}
36
+#	...
37
+#  }
38
+#
39
+smsotp {
40
+	#  The location of the socket.
41
+	socket = "/var/run/smsotp_socket"
42
+
43
+	#  Defines the challenge message that will be send to the
44
+	#  NAS. Default is "Enter Mobile PIN" }
45
+	challenge_message = "Enter Mobile PIN:"
46
+
47
+	#  Defines the Auth-Type section that is run for the response to
48
+	#  the challenge. Default is "smsotp-reply".
49
+	challenge_type = "smsotp-reply"
50
+}

+ 4
- 0
freeradius/config/tmp/freeradius/modules/soh View File

@@ -0,0 +1,4 @@
1
+# SoH module
2
+soh {
3
+	dhcp = yes
4
+}

+ 92
- 0
freeradius/config/tmp/freeradius/modules/sql_log View File

@@ -0,0 +1,92 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 3e6bf2104f74ffad8866eb69459a94f623601130 $
4
+
5
+#
6
+#  The rlm_sql_log module appends the SQL queries in a log
7
+#  file which is read later by the radsqlrelay program.
8
+#
9
+#  This module only performs the dynamic expansion of the
10
+#  variables found in the SQL statements. No operation is
11
+#  executed on the database server. (this could be done
12
+#  later by an external program) That means the module is
13
+#  useful only with non-"SELECT" statements.
14
+#
15
+#  See rlm_sql_log(5) manpage.
16
+#
17
+#  This same functionality could also be implemented by logging
18
+#  to a "detail" file, reading that, and then writing to SQL.
19
+#  See raddb/sites-available/buffered-sql for an example.
20
+#
21
+sql_log {
22
+	path = "${radacctdir}/sql-relay"
23
+	acct_table = "radacct"
24
+	postauth_table = "radpostauth"
25
+	sql_user_name = "%{%{User-Name}:-DEFAULT}"
26
+
27
+	#
28
+	#  Setting this to "yes" will allow UTF-8 characters to be
29
+	#  written to the log file.  Otherwise, they are escaped
30
+	#  as being potentially invalid.
31
+	#
32
+	utf8 = no
33
+
34
+	#
35
+	#  The names here are taken from the Acct-Status-Type names.
36
+	#  Just add another entry here for Accounting-On,
37
+	#  Accounting-Off, etc.
38
+	#
39
+	Start = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \
40
+	 NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
41
+	 AcctSessionTime, AcctTerminateCause) VALUES                 \
42
+	 ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
43
+	 '%{Framed-IP-Address}', '%S', '0', '0', '');"
44
+
45
+	Stop = "INSERT INTO ${acct_table} (AcctSessionId, UserName,  \
46
+	 NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
47
+	 AcctSessionTime, AcctTerminateCause) VALUES                 \
48
+	 ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
49
+	 '%{Framed-IP-Address}', '0', '%S', '%{Acct-Session-Time}',  \
50
+	 '%{Acct-Terminate-Cause}');"
51
+
52
+	Alive = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \
53
+	 NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
54
+	 AcctSessionTime, AcctTerminateCause) VALUES                 \
55
+	 ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
56
+	 '%{Framed-IP-Address}', '0', '0', '%{Acct-Session-Time}','');"
57
+
58
+	# The same as "Alive"
59
+	Interim-Update = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \
60
+	 NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
61
+	 AcctSessionTime, AcctTerminateCause) VALUES                 \
62
+	 ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
63
+	 '%{Framed-IP-Address}', '0', '0', '%{Acct-Session-Time}','');"
64
+
65
+	Post-Auth = "INSERT INTO ${postauth_table}                   \
66
+	 (username, pass, reply, authdate) VALUES                    \
67
+	 ('%{User-Name}', '%{User-Password:-Chap-Password}',         \
68
+	 '%{reply:Packet-Type}', '%S');"
69
+
70
+	Accounting-On = "UPDATE ${acct_table} \
71
+	  SET \
72
+	     acctstoptime       =  '%S', \
73
+	     acctsessiontime    =  unix_timestamp('%S') - \
74
+	                           unix_timestamp(acctstarttime), \
75
+	     acctterminatecause =  '%{Acct-Terminate-Cause}', \
76
+	     acctstopdelay      =  %{%{Acct-Delay-Time}:-0} \
77
+	  WHERE acctstoptime IS NULL \
78
+	  AND nasipaddress      =  '%{NAS-IP-Address}' \
79
+	  AND acctstarttime     <= '%S'""
80
+
81
+	Accounting-Off = "UPDATE ${acct_table} \
82
+	  SET \
83
+	     acctstoptime       =  '%S', \
84
+	     acctsessiontime    =  unix_timestamp('%S') - \
85
+	                           unix_timestamp(acctstarttime), \
86
+	     acctterminatecause =  '%{Acct-Terminate-Cause}', \
87
+	     acctstopdelay      =  %{%{Acct-Delay-Time}:-0} \
88
+	  WHERE acctstoptime IS NULL \
89
+	  AND nasipaddress      =  '%{NAS-IP-Address}' \
90
+	  AND acctstarttime     <= '%S'""
91
+}
92
+

+ 37
- 0
freeradius/config/tmp/freeradius/modules/sqlcounter_expire_on_login View File

@@ -0,0 +1,37 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: c950169307009b088b2c31274f496ffe38e8a793 $
4
+
5
+#
6
+#  Set an account to expire T seconds after first login.
7
+#  Requires the Expire-After attribute to be set, in seconds.
8
+#  You may need to edit raddb/dictionary to add the Expire-After
9
+#  attribute.
10
+#
11
+#  This example is for MySQL.  Other SQL variants should be similar.
12
+#
13
+#  For versions prior to 2.1.11, this module defined the following
14
+#  expansion strings:
15
+#
16
+#	%k	key_name
17
+#	%S	sqlmod_inst
18
+#
19
+#  These SHOULD NOT be used.  If these are used in your configuration,
20
+#  they should be replaced by the following strings, which will work
21
+#  identically to the previous ones:
22
+#
23
+#	%k	${key}
24
+#	%S	${sqlmod-inst}
25
+#
26
+sqlcounter expire_on_login {
27
+	counter-name = Expire-After-Initial-Login
28
+	check-name = Expire-After
29
+	sqlmod-inst = sql
30
+	key = User-Name
31
+	reset = never
32
+	query = "SELECT TIME_TO_SEC(TIMEDIFF(NOW(), acctstarttime)) \
33
+		 FROM radacct \
34
+		 WHERE UserName='%{${key}}' \
35
+		 ORDER BY acctstarttime \
36
+		 LIMIT 1;"
37
+}

+ 16
- 0
freeradius/config/tmp/freeradius/modules/sradutmp View File

@@ -0,0 +1,16 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: a7700bac6aaa93940c784f1b6df08b61eb77a1a3 $
4
+
5
+# "Safe" radutmp - does not contain caller ID, so it can be
6
+# world-readable, and radwho can work for normal users, without
7
+# exposing any information that isn't already exposed by who(1).
8
+#
9
+# This is another 'instance' of the radutmp module, but it is given
10
+# then name "sradutmp" to identify it later in the "accounting"
11
+# section.
12
+radutmp sradutmp {
13
+	filename = ${logdir}/sradutmp
14
+	perm = 0644
15
+	callerid = "no"
16
+}

+ 25
- 0
freeradius/config/tmp/freeradius/modules/unix View File

@@ -0,0 +1,25 @@
1
+# -*- text -*-
2
+#
3
+#  $Id: 5165139aaf39d533581161871542b48a6e3e8c42 $
4
+
5
+# Unix /etc/passwd style authentication
6
+#
7
+#  This module calls the system functions to get the "known good"
8
+#  password.  This password is usually in the "crypt" form, and is
9
+#  incompatible with CHAP, MS-CHAP, PEAP, etc.
10
+#
11
+#  If passwords are in /etc/shadow, you will need to set the "group"
12
+#  configuration in radiusd.conf.  Look for "shadow", and follow the
13
+#  instructions there.
14
+#
15
+unix {
16
+	#
17
+	#  The location of the "wtmp" file.
18
+	#  The only use for 'radlast'.  If you don't use
19
+	#  'radlast', then you can comment out this item.
20
+	#
21
+	#  Note that the radwtmp file may get large!  You should
22
+	#  rotate it (cp /dev/null radwtmp), or just not use it.
23
+	#
24
+	radwtmp = ${logdir}/radwtmp
25
+}

+ 112
- 0
freeradius/config/tmp/freeradius/modules/wimax View File

@@ -0,0 +1,112 @@
1
+#
2
+#	The WiMAX module currently takes no configuration.
3
+#
4
+#	It should be listed in the "authorize" and "preacct" sections.
5
+#	This enables the module to fix the horrible binary version
6
+#	of Calling-Station-Id to the normal format, as specified in
7
+#	RFC 3580, Section 3.21.
8
+#
9
+#	In order to calculate the various WiMAX keys, the module should
10
+#	be listed in the "post-auth" section.  If EAP authentication
11
+#	has been used, AND the EAP method derives MSK and EMSK, then
12
+#	the various WiMAX keys can be calculated.
13
+#
14
+#	Some useful things to remember:
15
+#
16
+#	WiMAX-MSK = EAP MSK, but is 64 octets.
17
+#
18
+#	MIP-RK-1 = HMAC-SHA256(ESMK, "miprk@wimaxforum.org" | 0x00020001)
19
+#	MIP-RK-2 = HMAC-SHA256(ESMK, MIP-RK-1 | "miprk@wimaxforum.org" | 0x00020002)
20
+#	MIP-RK = MIP-RK-1 | MIP-RK-2
21
+#
22
+#	MIP-SPI = first 4 octets of HMAC-SHA256(MIP-RK, "SPI CMIP PMIP")
23
+#		plus some magic... you've got to track *all* MIP-SPI's
24
+#		on your system!
25
+#
26
+#	SPI-CMIP4 = MIP-SPI
27
+#	SPI-PMIP4 = MIP-SPI + 1
28
+#	SPI-CMIP6 = MIP-SPI + 2
29
+#
30
+#	MN-NAI is the Mobile node NAI.  You have to create it, and put
31
+#	it into the request or reply as something like:
32
+#
33
+#		WiMAX-MN-NAI = "%{User-Name}"
34
+#
35
+#	You will also have to have the appropriate IP address (v4 or v6)
36
+#	in order to calculate the keys below.
37
+#
38
+#	Lifetimes are derived from Session-Timeout.  It needs to be set
39
+#	to some useful number.
40
+#
41
+#	The hash function below H() is HMAC-SHA1.
42
+#
43
+#
44
+#	MN-HA-CMIP4 = H(MIP-RK, "CMIP4 MN HA" | HA-IPv4 | MN-NAI)
45
+#
46
+#		Where HA-IPv4 is	WiMAX-hHA-IP-MIP4
47
+#		or maybe		WiMAX-vHA-IP-MIP4
48
+#
49
+#		Which goes into		WiMAX-MN-hHA-MIP4-Key
50
+#		or maybe		WiMAX-RRQ-MN-HA-Key
51
+#		or maybe even		WiMAX-vHA-MIP4-Key
52
+#
53
+#	The corresponding SPI is SPI-CMIP4, which is MIP-SPI,
54
+#
55
+#		which goes into		WiMAX-MN-hHA-MIP4-SPI
56
+#		or maybe		WiMAX-RRQ-MN-HA-SPI
57
+#		or even			WiMAX-MN-vHA-MIP4-SPI
58
+#
59
+#	MN-HA-PMIP4 = H(MIP-RK, "PMIP4 MN HA" | HA-IPv4 | MN-NAI)
60
+#	MN-HA-CMIP6 = H(MIP-RK, "CMIP6 MN HA" | HA-IPv6 | MN-NAI)
61
+#
62
+#		both with similar comments to above for MN-HA-CMIP4.
63
+#
64
+#	In order to tell which one to use (CMIP4, PMIP4, or CMIP6),
65
+#	you have to set WiMAX-IP-Technology in the reply to one of
66
+#	the appropriate values.
67
+#
68
+#
69
+#	FA-RK = H(MIP-RK, "FA-RK")
70
+#
71
+#	MN-FA = H(FA-RK, "MN FA" | FA-IP | MN-NAI)
72
+#
73
+#		Where does the FA-IP come from?  No idea...
74
+#
75
+#
76
+#	The next two keys (HA-RK and FA-HA) are not generated
77
+#	for every authentication request, but only on demand.
78
+#
79
+#	HA-RK = 160-bit random number assigned by the AAA server
80
+#		to a specific HA.
81
+#
82
+#	FA-HA = H(HA-RK, "FA-HA" | HA-IPv4 | FA-CoAv4 | SPI)
83
+#
84
+#		where HA-IPv4 is as above.
85
+#		and FA-CoAv4 address of the FA as seen by the HA
86
+#		and SPI is the relevant SPI for the HA-RK.
87
+#
88
+#	DHCP-RK = 160-bit random number assigned by the AAA server
89
+#		  to a specific DHCP server.  vDHCP-RK is the same
90
+#		  thing.
91
+#
92
+wimax {
93
+	#
94
+	#  Some WiMAX equipement requires that the MS-MPPE-*-Key
95
+	#  attributes are sent in the Access-Accept, in addition to
96
+	#  the WiMAX-MSK attribute.
97
+	#
98
+	#  Other WiMAX equipment request that the MS-MPPE-*-Key
99
+	#  attributes are NOT sent in the Access-Accept.
100
+	#
101
+	#  By default, the EAP modules sends MS-MPPE-*-Key attributes.
102
+	#  The default virtual server (raddb/sites-available/default)
103
+	#  contains examples of adding the WiMAX-MSK.
104
+	#
105
+	#  This configuration option makes the WiMAX module delete
106
+	#  the MS-MPPE-*-Key attributes.  The default is to leave
107
+	#  them in place.
108
+	#
109
+	#  If the keys are deleted (by setting this to "yes"), then
110
+	#  the WiMAX-MSK attribute is automatically added to the reply.
111
+	delete_mppe_keys = no
112
+}

+ 283
- 0
freeradius/config/tmp/freeradius/policy.conf View File

@@ -0,0 +1,283 @@
1
+# -*- text -*-
2
+##
3
+## policy.conf	-- FreeRADIUS server configuration file.
4
+##
5
+##	http://www.freeradius.org/
6
+##	$Id: 2668b29e3eee8eb9bfb9fbe33a6752314ac49632 $
7
+##
8
+
9
+#
10
+#  Policies are virtual modules, similar to those defined in the
11
+#  "instantate" section of radiusd.conf.
12
+#
13
+#  Defining a policy here means that it can be referenced in multiple
14
+#  places as a *name*, rather than as a series of conditions to match,
15
+#  and actions to take.
16
+#
17
+#  Policies are something like subroutines in a normal language, but
18
+#  they cannot be called recursively.  They MUST be defined in order.
19
+#  If policy A calls policy B, then B MUST be defined before A.
20
+#
21
+policy {
22
+	#
23
+	#	Forbid all EAP types.
24
+	#
25
+	forbid_eap {
26
+		if (EAP-Message) {
27
+			reject
28
+		}
29
+	}
30
+
31
+	#
32
+	#	Forbid all non-EAP types outside of an EAP tunnel.
33
+	#
34
+	permit_only_eap {
35
+		if (!EAP-Message) {
36
+			#  We MAY be inside of a TTLS tunnel.
37
+			#  PEAP and EAP-FAST require EAP inside of
38
+			#  the tunnel, so this check is OK.
39
+			#  If so, then there MUST be an outer EAP message.
40
+			if (!"%{outer.request:EAP-Message}") {
41
+				reject
42
+			}
43
+		}
44
+	}
45
+
46
+	#
47
+	#	Forbid all attempts to login via realms.
48
+	#
49
+	deny_realms {
50
+		if (User-Name =~ /@|\\/) {
51
+			reject
52
+		}
53
+	}
54
+
55
+	#
56
+	#	If you want the server to pretend that it is dead,
57
+	#	then use the "do_not_respond" policy.
58
+	#
59
+	do_not_respond {
60
+		update control {
61
+			Response-Packet-Type := Do-Not-Respond
62
+		}
63
+
64
+		handled
65
+	}
66
+
67
+	#
68
+	#  Force some sanity on User-Name.  This helps to avoid issues
69
+	#  issues where the back-end database is "forgiving" about
70
+	#  what constitutes a user name.
71
+	#
72
+	filter_username {
73
+		#
74
+		#  reject mixed case
75
+		#  e.g. "UseRNaMe"
76
+		#
77
+		if (User-Name != "%{tolower:%{User-Name}}") {
78
+			reject
79
+		}
80
+
81
+		#
82
+		#  reject all whitespace
83
+		#  e.g. "user@ site.com", or "us er", or " user", or "user "
84
+		#
85
+		if (User-Name =~ / /) {
86
+			update reply {
87
+				Reply-Message += "Rejected: Username contains whitespace"
88
+			}
89
+			reject
90
+		}
91
+
92
+		#
93
+		#  reject Multiple @'s
94
+		#  e.g. "user@site.com@site.com"
95
+		#
96
+		if(User-Name =~ /@.*@/ ) {
97
+			update reply {
98
+				Reply-Message += "Rejected: Multiple @ in username"
99
+			}
100
+			reject
101
+		}
102
+
103
+		#
104
+		#  reject double dots
105
+		#  e.g. "user@site..com"
106
+		#
107
+		if (User-Name =~ /\\.\\./ ) {
108
+			update reply {
109
+				Reply-Message += "Rejected: Username comtains ..s"
110
+			}
111
+			reject
112
+		}
113
+
114
+		#
115
+		#  must have at least 1 string-dot-string after @
116
+		#  e.g. "user@site.com"
117
+		#
118
+		if (User-Name !~ /@(.+)\\.(.+)$/)  {
119
+			update reply {
120
+				Reply-Message += "Rejected: Realm does not have at least one dot seperator"
121
+			}
122
+			reject
123
+		}
124
+
125
+		#
126
+		#  Realm ends with a dot
127
+		#  e.g. "user@site.com."
128
+		#
129
+                if (User-Name =~ /\\.$/)  {
130
+                        update reply {
131
+                                Reply-Message += "Rejected: Realm ends with a dot"
132
+                        }
133
+                        reject
134
+                }
135
+
136
+		#
137
+                #  Realm begins with a dot
138
+		#  e.g. "user@.site.com"
139
+                #
140
+                if (User-Name =~ /@\\./)  {
141
+                        update reply {
142
+                                Reply-Message += "Rejected: Realm begins with a dot"
143
+                        }
144
+                        reject
145
+                }
146
+	}
147
+
148
+	#	
149
+	#  The following policies are for the Chargeable-User-Identity
150
+	#  (CUI) configuration.
151
+	#
152
+
153
+	#
154
+	#  The client indicates it can do CUI by sending a CUI attribute	
155
+	#  containing one zero byte
156
+	#
157
+	cui_authorize {
158
+		update request {
159
+			Chargeable-User-Identity:='\\000'
160
+		}
161
+	}
162
+
163
+	#
164
+	#  Add a CUI attribute based on the User-Name, and a secret key
165
+	#  known only to this server.
166
+	#
167
+	cui_postauth {
168
+		if (FreeRadius-Proxied-To == 127.0.0.1) {
169
+			if (outer.request:Chargeable-User-Identity) {
170
+				update outer.reply {
171
+					Chargeable-User-Identity:="%{md5:%{config:cui_hash_key}%{User-Name}}"
172
+				}
173
+			}
174
+		}
175
+		else {
176
+			if (Chargeable-User-Identity) {
177
+				update reply {
178
+					Chargeable-User-Identity="%{md5:%{config:cui_hash_key}%{User-Name}}"
179
+				}
180
+			}
181
+		}
182
+	}
183
+
184
+	#
185
+	#  If there is a CUI attribute in the reply, add it to the DB.
186
+	#
187
+	cui_updatedb {
188
+		if (reply:Chargeable-User-Identity) {
189
+			cui
190
+		}
191
+	}
192
+
193
+	#
194
+	#  If we had stored a CUI for the User, add it to the request.
195
+	#
196
+	cui_accounting {
197
+		#
198
+		#  If the CUI isn't in the packet, see if we can find it
199
+		#  in the DB.
200
+		#
201
+		if (!Chargeable-User-Identity) {
202
+			update request {
203
+				Chargeable-User-Identity := "%{cui: SELECT cui FROM cui WHERE clientipaddress = '%{Client-IP-Address}' AND callingstationid = '%{Calling-Station-Id}' AND username = '%{User-Name}'}"
204
+			}
205
+		}
206
+
207
+		#
208
+		#  If it exists now, then write out when we last saw
209
+		#  this CUI.
210
+		#
211
+		if (Chargeable-User-Identity && (Chargeable-User-Identity != "")) {
212
+			cui
213
+		}
214
+	}
215
+
216
+	#
217
+	#  Normalize the MAC Addresses in the Calling/Called-Station-Id
218
+	#
219
+	mac-addr = ([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})
220
+
221
+	#  Add "rewrite.called_station_id" in the "authorize" and "preacct"
222
+	#  sections.
223
+	rewrite.called_station_id {
224
+		if((Called-Station-Id) && "%{Called-Station-Id}" =~ /^%{config:policy.mac-addr}(:(.+))?$/i) {
225
+			update request {
226
+				Called-Station-Id := "%{tolower:%{1}-%{2}-%{3}-%{4}-%{5}-%{6}}"
227
+			}
228
+
229
+			# SSID component?
230
+			if ("%{8}") {
231
+				update request {
232
+					Called-Station-Id := "%{Called-Station-Id}:%{8}"
233
+				}
234
+			}
235
+			updated
236
+		}
237
+		else {
238
+			noop
239
+		}
240
+	}
241
+
242
+	#  Add "rewrite.calling_station_id" in the "authorize" and "preacct"
243
+	#  sections.
244
+	rewrite.calling_station_id {
245
+		if((Calling-Station-Id) && "%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i) {
246
+			update request {
247
+				Calling-Station-Id := "%{tolower:%{1}-%{2}-%{3}-%{4}-%{5}-%{6}}"
248
+			}
249
+			updated
250
+		}
251
+		else {
252
+			noop
253
+		}
254
+	}
255
+
256
+	#  Assign compatibility data to request for sqlippool
257
+	dhcp_sqlippool.post-auth {
258
+
259
+
260
+		#  Do some minor hacks to the request so that it looks
261
+		#  like a RADIUS request to the SQL IP Pool module.
262
+		update request {
263
+			User-Name = "DHCP-%{DHCP-Client-Hardware-Address}"
264
+			Calling-Station-Id = "%{DHCP-Client-Hardware-Address}"
265
+			NAS-IP-Address = "%{%{DHCP-Gateway-IP-Address}:-127.0.0.1}"
266
+			Acct-Status-Type = Start
267
+		}
268
+
269
+		#  Call the actual module
270
+		#
271
+		#  Uncomment this in order to really call it!
272
+#		dhcp_sqlippool
273
+		fail
274
+
275
+		#  Convert Framed-IP-Address to DHCP, but only if we
276
+		#  actually allocated an address.
277
+		if (ok) {
278
+			update reply {
279
+				DHCP-Your-IP-Address = "%{reply:Framed-IP-Address}"
280
+			}
281
+		}
282
+	}
283
+}

+ 185
- 0
freeradius/config/tmp/freeradius/policy.txt View File

@@ -0,0 +1,185 @@
1
+#
2
+#	Sample of a policy language for rlm_policy.
3
+#
4
+#	This is NOT the "unlang" policy, and has NO RELATION to "unlang"!
5
+#	The syntax is different, and the functionality is different.
6
+#
7
+
8
+#	As of 2.0.0, the new configuration "un-language" is better
9
+#	tested, has more features, and is better integrated into the
10
+#	server than the rlm_policy module.  rlm_policy is deprecated,
11
+#	and will likely be removed in a future release.
12
+#
13
+#	There is no documentation other than this file.
14
+#
15
+#	The syntax is odd, but it sort of works.
16
+#
17
+#	A number of sites are using it in production servers,
18
+#	so it appears to be stable.  However, we cannot answer
19
+#	questions about it, because we use "unlang", instead of
20
+#	this file.	
21
+#
22
+#	$Id: 1f62c55ae236dc9359764f4729f7ea4a8d36e2df $
23
+#
24
+#  Debugging statements
25
+#
26
+#debug print_tokens	# as we're parsing this file
27
+debug print_policy	# once the file has been parsed
28
+
29
+# Using this requires code edits to rlm_policy/evaluate.c
30
+#debug evaluate		# print limited information during evaluation
31
+
32
+#
33
+#  A named policy.
34
+#
35
+policy 3pm {
36
+if (Time-Of-Day < "15:00") {
37
+   #
38
+   #  The general form of edits to the attribute lists:
39
+   #
40
+   #   name s-operator {
41
+   #	    Attribute-Name = Value
42
+   #   }
43
+   #
44
+   #  name is: request, reply, control, proxy-request, proxy-reply
45
+   #
46
+   #  s-operator is operator for section, not attributes:
47
+   #
48
+   #		=	append, using operators from attributes
49
+   #		.=	append attributes, ignoring operators from attributes
50
+   #		^=	add to head of list
51
+   #		^==	add BEFORE matching attribute
52
+   #		^.	append
53
+   #		^.=	append BEFORE matching attribute
54
+   #		$=	add AFTER  (same as =)
55
+   #		$==	add AFTER matching attribute
56
+   #		$.	add after  (same as .=)
57
+   #		$.=	add after matching
58
+   #
59
+   #  If the above explanation confuses you, don't ask.  Try various
60
+   #  configurations to see what happens.  The results are difficult
61
+   #  to explain, but easy to understand once you see them in action.
62
+   #
63
+   #  The "matching attribute" text above refers to the syntax:
64
+   #
65
+   #   name s-operator (match) {
66
+   #	    Attribute-Name = Value
67
+   #   }
68
+   #
69
+   #  Where "match" is something like:	User-Name == "bob"
70
+   #
71
+   #  This lets you insert/edit/update attributes by selected
72
+   #  position, which can be useful.
73
+   #
74
+   reply .= {
75
+      # Use ARAP-Password for testing because it's an attribute
76
+      # no one cares about.
77
+      ARAP-Password = "< 15:00"
78
+   }
79
+}
80
+
81
+}
82
+
83
+#
84
+#  A named policy, executed during the "authorize" phase,
85
+#  because it's named "authorize". 
86
+#
87
+policy authorize {
88
+  if (CHAP-Password) {
89
+     if (!CHAP-Challenge) {
90
+        print "Adding CHAP-Challenge = %{request:Packet-Authentication-Vector}\n"
91
+
92
+        #
93
+        #  Append all attributes to the specified list.
94
+        #  The per-attribute operators MUST be '='
95
+        #
96
+        request .= {
97
+           CHAP-Challenge = "%{request:Packet-Authentication-Vector}"
98
+        }
99
+     }
100
+
101
+     #
102
+     #  Use per-attribute operators to do override, replace, etc.
103
+     #  It's "control", not "check items", because "check items"
104
+     #  is a hold-over from the "users" file, and we no longer like that.
105
+     #
106
+     control = {
107
+     	  Auth-Type := CHAP
108
+     }
109
+  }
110
+
111
+#
112
+#  This could just as well be "%{ldap: query...}" =~ ...
113
+#
114
+#  if ("%{User-Name}" =~ "^(b)") {
115
+#     reply .= {
116
+#	   Arap-Password = "Hello, %{1}"
117
+#     }
118
+#  }
119
+
120
+  #
121
+  #  Execute "3pm", as if it was in-line here.
122
+  #
123
+#  call 3pm
124
+}
125
+
126
+######################################################################
127
+#
128
+#  The following entries are for example purposes only.
129
+#
130
+
131
+#  Insert the attribute at the top of the list.
132
+#
133
+#reply ^= {
134
+#  Attribute1 += "Value1"
135
+#}
136
+
137
+
138
+#  Insert attribute1 before Attribute2 if found, otherwise it behaves 
139
+#  like ^=
140
+#reply ^== ( Attribute2 == "Value2" ) {
141
+#	Attribute1 += "Value1"
142
+#}
143
+
144
+# ^. and ^.= have the same difference as .= and =
145
+# namely they append the attribute list instead of looking at the
146
+# attribute operators.
147
+#
148
+# Otherwise they are the same.
149
+
150
+#  Motivation:
151
+#
152
+#  Cisco NAS's will kick users who assign a VRF after assigning an IP 
153
+#  address. The VRF must come first.
154
+#
155
+#  A sample policy to fix this is:
156
+#
157
+policy add_inter_vrf {
158
+	#
159
+	#	If there's a matching lcp:...,
160
+	#	then add the vrf entry before it.
161
+	#
162
+	reply ^== ( reply:Cisco-Avpair =~ "lcp:interface-config") {
163
+		Cisco-Avpair    += "lcp:interface-config=ip vrf forwarding CHL-PRIVATE"
164
+	}
165
+
166
+	#
167
+	#	If there's no ip address thingy,
168
+	#	add ip unnumbered after the vrf stuff.
169
+	#
170
+	if (!reply:Cisco-Avpair =~ "lcp:interface-config=ip address.*") {
171
+	        reply $== (reply:Cisco-AVpair == "lcp:interface-config=ip vrf forwarding CHL-PRIVATE") {
172
+        		Cisco-Avpair    += "lcp:interface-config=ip unnumbered l10"
173
+	        }
174
+	}
175
+
176
+	#
177
+	#	No IP address assigned through RADIUS, tell the Cisco
178
+	#	NAS to assign it from it's own private IP pool.
179
+	#
180
+	if (!reply:Framed-IP-Address =* "") {
181
+		reply = {
182
+                	Cisco-Avpair    += "ip:addr-pool=privatepool"
183
+		}
184
+	}
185
+}

+ 31
- 0
freeradius/config/tmp/freeradius/preproxy_users View File

@@ -0,0 +1,31 @@
1
+#
2
+#  Configuration file for the rlm_files module.
3
+#  Please see rlm_files(5) manpage for more information.
4
+#
5
+#  $Id: 0f5d15ad8b2e96a4d65808ac949793aab5c1c639 $
6
+#
7
+#  This file is similar to the "users" file.  The check items
8
+#  are compared against the request, but the "reply" items are
9
+#  used to update the proxied packet, not the reply to the NAS.
10
+#
11
+#  You can use this file to re-write requests which are about to
12
+#  be sent to a home server.
13
+#
14
+
15
+#
16
+#  Requests destinated to realm "extisp" are sent to a RADIUS
17
+#  home server hosted by an other company which doesn't know about
18
+#  the IP addresses of our NASes. Therefore we replace the value of
19
+#  the NAS-IP-Address attribute by a unique value we communicated
20
+#  to them.
21
+#
22
+#DEFAULT Realm == "extisp"
23
+#	NAS-IP-Address := 10.1.2.3
24
+
25
+#
26
+#  For all proxied packets, set the User-Name in the proxied packet
27
+#  to the Stripped-User-Name, if it exists.  If not, set it to the
28
+#  User-Name from the original request.
29
+#
30
+#DEFAULT
31
+#	User-Name := `%{Stripped-User-Name:-%{User-Name}}`

+ 759
- 0
freeradius/config/tmp/freeradius/proxy.conf View File

@@ -0,0 +1,759 @@
1
+# -*- text -*-
2
+##
3
+## proxy.conf -- proxy radius and realm configuration directives
4
+##
5
+##	$Id: 413fc1438f266669a8e8913307f465da190c1ce8 $
6
+
7
+#######################################################################
8
+#
9
+#  Proxy server configuration
10
+#
11
+#  This entry controls the servers behaviour towards ALL other servers
12
+#  to which it sends proxy requests.
13
+#
14
+proxy server {
15
+	#
16
+	#  Note that as of 2.0, the "synchronous", "retry_delay",
17
+	#  "retry_count", and "dead_time" have all been deprecated.
18
+	#  For backwards compatibility, they are are still accepted
19
+	#  by the server, but they ONLY apply to the old-style realm
20
+	#  configuration.  i.e. realms with "authhost" and/or "accthost"
21
+	#  entries.
22
+	#
23
+	#  i.e. "retry_delay" and "retry_count" have been replaced
24
+	#  with per-home-server configuration.  See the "home_server"
25
+	#  example below for details.
26
+	#
27
+	#  i.e. "dead_time" has been replaced with a per-home-server
28
+	#  "revive_interval".  We strongly recommend that this not
29
+	#  be used, however.  The new method is much better.
30
+
31
+	#
32
+	#  In 2.0, the server is always "synchronous", and setting
33
+	#  "synchronous = no" is impossible.  This simplifies the
34
+	#  server and increases the stability of the network.
35
+	#  However, it means that the server (i.e. proxy) NEVER
36
+	#  originates packets.  It proxies packets ONLY when it receives
37
+	#  a packet or a re-transmission from the NAS.  If the NAS never
38
+	#  re-transmits, the proxy never re-transmits, either.  This can
39
+	#  affect fail-over, where a packet does *not* fail over to a
40
+	#  second home server.. because the NAS never retransmits the
41
+	#  packet.
42
+	#
43
+	#  If you need to set "synchronous = no", please send a
44
+	#  message to the list <freeradius-users@lists.freeradius.org>
45
+	#  explaining why this feature is vital for your network.
46
+
47
+	#
48
+	#  If a realm exists, but there are no live home servers for
49
+	#  it, we can fall back to using the "DEFAULT" realm.  This is
50
+	#  most useful for accounting, where the server can proxy
51
+	#  accounting requests to home servers, but if they're down,
52
+	#  use a DEFAULT realm that is LOCAL (i.e. accthost = LOCAL),
53
+	#  and then store the packets in the "detail" file.  That data
54
+	#  can be later proxied to the home servers by radrelay, when
55
+	#  those home servers come back up again.	
56
+
57
+	#  Setting this to "yes" may have issues for authentication.
58
+	#  i.e. If you are proxying for two different ISP's, and then
59
+	#  act as a general dial-up for Gric.  If one of the first two
60
+	#  ISP's has their RADIUS server go down, you do NOT want to
61
+	#  proxy those requests to GRIC.  Instead, you probably want
62
+	#  to just drop the requests on the floor.  In that case, set
63
+	#  this value to 'no'.
64
+	#
65
+	#  allowed values: {yes, no}
66
+	#
67
+	default_fallback = no
68
+
69
+}
70
+
71
+#######################################################################
72
+#
73
+#  Configuration for the proxy realms.
74
+#
75
+#  As of 2.0. the old-style "realms" file is deprecated, and is not
76
+#  used by FreeRADIUS.
77
+#
78
+#  As of 2.0, the "realm" configuration has changed.  Instead of
79
+#  specifying "authhost" and "accthost" in a realm section, the home
80
+#  servers are specified seperately in a "home_server" section.  For
81
+#  backwards compatibility, you can still use the "authhost" and
82
+#  "accthost" directives.  If you only have one home server for a
83
+#  realm, it is easier to use the old-style configuration.
84
+#
85
+#  However, if you have multiple servers for a realm, we STRONGLY
86
+#  suggest moving to the new-style configuration.
87
+#
88
+#
89
+#  Load-balancing and failover between home servers is handled via
90
+#  a "home_server_pool" section.
91
+#
92
+#  Finally, The "realm" section defines the realm, some options, and
93
+#  indicates which server pool should be used for the realm.
94
+#
95
+#  This change means that simple configurations now require multiple
96
+#  sections to define a realm.  However, complex configurations
97
+#  are much simpler than before, as multiple realms can share the same
98
+#  server pool.
99
+#
100
+#  That is, realms point to server pools, and server pools point to
101
+#  home servers.  Multiple realms can point to one server pool.  One
102
+#  server pool can point to multiple home servers.  Each home server
103
+#  can appear in one or more pools.
104
+#
105
+
106
+######################################################################
107
+#
108
+#  This section defines a "Home Server" which is another RADIUS
109
+#  server that gets sent proxied requests.  In earlier versions
110
+#  of FreeRADIUS, home servers were defined in "realm" sections,
111
+#  which was awkward.  In 2.0, they have been made independent
112
+#  from realms, which is better for a number of reasons.
113
+#
114
+home_server localhost {
115
+	#
116
+	#  Home servers can be sent Access-Request packets
117
+	#  or Accounting-Request packets.
118
+	#
119
+	#  Allowed values are:
120
+	#	auth	  - Handles Access-Request packets
121
+	#	acct	  - Handles Accounting-Request packets
122
+	#	auth+acct - Handles Access-Request packets at "port",
123
+	#		    and Accounting-Request packets at "port + 1"
124
+	#	coa	  - Handles CoA-Request and Disconnect-Request packets.
125
+	#		    See also raddb/sites-available/originate-coa
126
+	type = auth
127
+
128
+	#
129
+	#  Configure ONE OF the following entries:
130
+	#
131
+	#	IPv4 address
132
+	#
133
+	ipaddr = 127.0.0.1
134
+
135
+	#	OR IPv6 address
136
+	# ipv6addr = ::1
137
+
138
+	#	OR virtual server	
139
+	# virtual_server = foo
140
+
141
+	#	Note that while both ipaddr and ipv6addr will accept
142
+	#	both addresses and host names, we do NOT recommend
143
+	#	using host names.  When you specify a host name, the
144
+	#	server has to do a DNS lookup to find the IP address
145
+	#	of the home server.  If the DNS server is slow or
146
+	#	unresponsive, it means that FreeRADIUS will NOT be
147
+	#	able to determine the address, and will therefore NOT
148
+	#	start.
149
+	#
150
+	#	Also, the mapping of host name to address is done ONCE
151
+	#	when the server starts.  If DNS is later updated to
152
+	#	change the address, FreeRADIUS will NOT discover that
153
+	#	until after a re-start, or a HUP.
154
+	#
155
+	#	If you specify a virtual_server here, then requests
156
+	#	will be proxied internally to that virtual server.
157
+	#	These requests CANNOT be proxied again, however.  The
158
+	#	intent is to have the local server handle packets
159
+	#	when all home servers are dead.
160
+	#
161
+	#	Requests proxied to a virtual server will be passed
162
+	#	through the pre-proxy and post-proxy sections, just
163
+	#	like any other request.  See also the sample "realm"
164
+	#	configuration, below.
165
+	#
166
+	#	None of the rest of the home_server configuration is used
167
+	#	for the "virtual_server" configuration.
168
+
169
+	#
170
+	#  The port to which packets are sent.
171
+	#
172
+	#  Usually 1812 for type "auth", and  1813 for type "acct".
173
+	#  Older servers may use 1645 and 1646.
174
+	#  Use 3799 for type "coa"
175
+	#
176
+	port = 1812
177
+
178
+	#
179
+	#  The shared secret use to "encrypt" and "sign" packets between
180
+	#  FreeRADIUS and the home server.
181
+	#
182
+	#  The secret can be any string, up to 8k characters in length.
183
+	#
184
+	#  Control codes can be entered vi octal encoding,
185
+	#	e.g. "\101\102" == "AB"
186
+	#  Quotation marks can be entered by escaping them,
187
+	#	e.g. "foo\"bar"
188
+	#  Spaces or other "special" characters can be entered
189
+	#  by putting quotes around the string.
190
+	#	e.g. "foo bar"
191
+	#	     "foo;bar"
192
+	#
193
+	secret = testing123
194
+
195
+	############################################################
196
+	#
197
+	#  The rest of the configuration items listed here are optional,
198
+	#  and do not have to appear in every home server definition.
199
+	#
200
+	############################################################
201
+
202
+	#
203
+	#  You can optionally specify the source IP address used when
204
+	#  proxying requests to this home server.  When the src_ipaddr
205
+	#  it set, the server will automatically create a proxy
206
+	#  listener for that IP address.
207
+	#
208
+	#  If you specify this field for one home server, you will
209
+	#  likely need to specify it for ALL home servers.
210
+	#
211
+	#  If you don't care about the source IP address, leave this
212
+	#  entry commented.
213
+	#
214
+#	src_ipaddr = 127.0.0.1
215
+
216
+	#  RFC 5080 suggests that all clients SHOULD include it in an
217
+	#  Access-Request.  The configuration item below tells the
218
+	#  proxying server (i.e. this one) whether or not the home
219
+	#  server requires a Message-Authenticator attribute.  If it
220
+	#  is required (value set to "yes"), then all Access-Request
221
+	#  packets sent to that home server will have a
222
+	#  Message-Authenticator attribute.
223
+	#
224
+	#  We STRONGLY recommend that this flag be set to "yes"
225
+	#  for ALL home servers.  Doing so will have no performance
226
+	#  impact on the proxy or on the home servers.  It will,
227
+	#  however, allow administrators to detect problems earlier.
228
+	#
229
+	#  allowed values: yes, no
230
+	require_message_authenticator = yes
231
+
232
+	#
233
+	#  If the home server does not respond to a request within
234
+	#  this time, this server will initiate "zombie_period".
235
+	#
236
+	#  The response window is large because responses MAY be slow,
237
+	#  especially when proxying across the Internet.
238
+	#
239
+	#  Useful range of values: 5 to 60
240
+	response_window = 20
241
+
242
+	#
243
+	#  If you want the old behavior of the server rejecting
244
+	#  proxied requests after "response_window" timeout, set
245
+	#  the following configuration item to "yes".
246
+	#
247
+	#  This configuration WILL be removed in a future release
248
+	#  If you believe you need it, email the freeradius-users
249
+	#  list, and explain why it should stay in the server.
250
+	#
251
+#	no_response_fail = no
252
+
253
+	#
254
+	#  If the home server does not respond to ANY packets during
255
+	#  the "zombie period", it will be considered to be dead.
256
+	#
257
+	#  A home server that is marked "zombie" will be used for
258
+	#  proxying as a low priority.  If there are live servers,
259
+	#  they will always be preferred to a zombie.  Requests will
260
+	#  be proxied to a zombie server ONLY when there are no
261
+	#  live servers.
262
+	#
263
+	#  Any request that is proxied to a home server will continue
264
+	#  to be sent to that home server until the home server is
265
+	#  marked dead.  At that point, it will fail over to another
266
+	#  server, if a live server is available.  If none is available,
267
+	#  then the "post-proxy-type fail" handler will be called.
268
+	#
269
+	#  If "status_check" below is something other than "none", then
270
+	#  the server will start sending status checks at the start of
271
+	#  the zombie period.  It will continue sending status checks
272
+	#  until the home server is marked "alive".
273
+	#
274
+	#  Useful range of values: 20 to 120
275
+	zombie_period = 40
276
+
277
+	############################################################
278
+	#
279
+	#  As of 2.0, FreeRADIUS supports RADIUS layer "status
280
+	#  checks".  These are used by a proxy server to see if a home
281
+	#  server is alive.
282
+	#
283
+	#  These status packets are sent ONLY if the proxying server
284
+	#  believes that the home server is dead.  They are NOT sent
285
+	#  if the proxying server believes that the home server is
286
+	#  alive.  They are NOT sent if the proxying server is not
287
+	#  proxying packets.
288
+	#
289
+	#  If the home server responds to the status check packet,
290
+	#  then it is marked alive again, and is returned to use.
291
+	#
292
+	############################################################
293
+
294
+	#
295
+	#  Some home servers do not support status checks via the
296
+	#  Status-Server packet.  Others may not have a "test" user
297
+	#  configured that can be used to query the server, to see if
298
+	#  it is alive.  For those servers, we have NO WAY of knowing
299
+	#  when it becomes alive again.  Therefore, after the server
300
+	#  has been marked dead, we wait a period of time, and mark
301
+	#  it alive again, in the hope that it has come back to
302
+	#  life.
303
+	#
304
+	#  If it has NOT come back to life, then FreeRADIUS will wait
305
+	#  for "zombie_period" before marking it dead again.  During
306
+	#  the "zombie_period", ALL AUTHENTICATIONS WILL FAIL, because
307
+	#  the home server is still dead.  There is NOTHING that can
308
+	#  be done about this, other than to enable the status checks,
309
+	#  as documented below.
310
+	#
311
+	#  e.g. if "zombie_period" is 40 seconds, and "revive_interval"
312
+	#  is 300 seconds, the for 40 seconds out of every 340, or about
313
+	#  10% of the time, all authentications will fail.
314
+	#
315
+	#  If the "zombie_period" and "revive_interval" configurations
316
+	#  are set smaller, than it is possible for up to 50% of
317
+	#  authentications to fail.
318
+	#
319
+	#  As a result, we recommend enabling status checks, and
320
+	#  we do NOT recommend using "revive_interval".
321
+	#
322
+	#  The "revive_interval" is used ONLY if the "status_check"
323
+	#  entry below is "none".  Otherwise, it will not be used,
324
+	#  and should be deleted.
325
+	#
326
+	#  Useful range of values: 60 to 3600
327
+	revive_interval = 120
328
+
329
+	#
330
+	#  The proxying server (i.e. this one) can do periodic status
331
+	#  checks to see if a dead home server has come back alive.
332
+	#
333
+	#  If set to "none", then the other configuration items listed
334
+	#  below are not used, and the "revive_interval" time is used
335
+	#  instead.
336
+	#
337
+	#  If set to "status-server", the Status-Server packets are
338
+	#  sent.  Many RADIUS servers support Status-Server.  If a
339
+	#  server does not support it, please contact the server
340
+	#  vendor and request that they add it.
341
+	#
342
+	#  If set to "request", then Access-Request, or Accounting-Request
343
+	#  packets are sent, depending on the "type" entry above (auth/acct).
344
+	#  
345
+	#  Allowed values: none, status-server, request
346
+	status_check = status-server
347
+
348
+	#
349
+	#  If the home server does not support Status-Server packets,
350
+	#  then the server can still send Access-Request or
351
+	#  Accounting-Request packets, with a pre-defined user name.
352
+	#
353
+	#  This practice is NOT recommended, as it may potentially let
354
+	#  users gain network access by using these "test" accounts!
355
+	#
356
+	#  If it is used, we recommend that the home server ALWAYS
357
+	#  respond to these Access-Request status checks with
358
+	#  Access-Reject.  The status check just needs an answer, it
359
+	#  does not need an Access-Accept.
360
+	#
361
+	#  For Accounting-Request status checks, only the username
362
+	#  needs to be set.  The rest of the accounting attribute are
363
+	#  set to default values.  The home server that receives these
364
+	#  accounting packets SHOULD NOT treat them like normal user
365
+	#  accounting packets.  i.e It should probably NOT log them to
366
+	#  a database.
367
+	#
368
+	# username = "test_user_please_reject_me"
369
+	# password = "this is really secret"
370
+
371
+	#
372
+	#  Configure the interval between sending status check packets.
373
+	#
374
+	#  Setting it too low increases the probability of spurious
375
+	#  fail-over and fallback attempts.
376
+	#
377
+	#  Useful range of values: 6 to 120
378
+	check_interval = 30
379
+
380
+	#
381
+	#  Configure the number of status checks in a row that the
382
+	#  home server needs to respond to before it is marked alive.
383
+	#
384
+	#  If you want to mark a home server as alive after a short
385
+	#  time period of being responsive, it is best to use a small
386
+	#  "check_interval", and a large value for
387
+	#  "num_answers_to_alive".  Using a long "check_interval" and
388
+	#  a small number for "num_answers_to_alive" increases the
389
+	#  probability of spurious fail-over and fallback attempts.
390
+	#
391
+	#  Useful range of values: 3 to 10
392
+	num_answers_to_alive = 3
393
+
394
+	#
395
+	#  Limit the total number of outstanding packets to the home
396
+	#  server.
397
+	#
398
+	#  if ((#request sent) - (#requests received)) > max_outstanding
399
+	#	then stop sending more packets to the home server
400
+	#
401
+	#  This lets us gracefully fall over when the home server
402
+	#  is overloaded.
403
+	max_outstanding = 65536
404
+
405
+	#
406
+	#  The configuration items in the next sub-section are used ONLY
407
+	#  when "type = coa".  It is ignored for all other type of home
408
+	#  servers.
409
+	#
410
+	#  See RFC 5080 for the definitions of the following terms.
411
+	#  RAND is a function (internal to FreeRADIUS) returning
412
+	#  random numbers between -0.1 and +0.1
413
+	#
414
+	#  First Re-transmit occurs after:
415
+	#
416
+	#	 RT = IRT + RAND*IRT
417
+	#
418
+	#  Subsequent Re-transmits occur after:
419
+	#
420
+	#	RT = 2 * RTprev + RAND * RTprev
421
+	#
422
+	#  Re-trasnmits are capped at:
423
+	#
424
+	#	if (MRT && (RT > MRT)) RT = MRT + RAND * MRT
425
+	#
426
+	#  For a maximum number of attempts: MRC
427
+	#
428
+	#  For a maximum (total) period of time: MRD.
429
+	#
430
+	coa {
431
+		# Initial retransmit interval: 1..5
432
+		irt = 2
433
+
434
+		# Maximum Retransmit Timeout: 1..30 (0 == no maximum)
435
+		mrt = 16
436
+
437
+		# Maximum Retransmit Count: 1..20 (0 == retransmit forever)
438
+		mrc = 5
439
+
440
+		# Maximum Retransmit Duration: 5..60
441
+		mrd = 30
442
+	}
443
+}
444
+
445
+# Sample virtual home server.
446
+# 
447
+#
448
+#home_server virtual.example.com {
449
+#	    virtual_server = virtual.example.com
450
+#}
451
+
452
+######################################################################
453
+#
454
+#  This section defines a pool of home servers that is used
455
+#  for fail-over and load-balancing.  In earlier versions of
456
+#  FreeRADIUS, fail-over and load-balancing were defined per-realm.
457
+#  As a result, if a server had 5 home servers, each of which served
458
+#  the same 10 realms, you would need 50 "realm" entries.
459
+#
460
+#  In version 2.0, you would need 5 "home_server" sections,
461
+#  10 'realm" sections, and one "home_server_pool" section to tie the
462
+#  two together.
463
+#
464
+home_server_pool my_auth_failover {
465
+	#
466
+	#  The type of this pool controls how home servers are chosen.
467
+	#
468
+	#  fail-over - the request is sent to the first live
469
+	#  	home server in the list.  i.e. If the first home server
470
+	#	is marked "dead", the second one is chosen, etc.
471
+	#
472
+	#  load-balance - the least busy home server is chosen,
473
+	#	where "least busy" is counted by taking the number of
474
+	#	requests sent to that home server, and subtracting the
475
+	#	number of responses received from that home server.
476
+	#
477
+	#	If there are two or more servers with the same low
478
+	#	load, then one of those servers is chosen at random.
479
+	#	This configuration is most similar to the old
480
+	#	"round-robin" method, though it is not exactly the same.
481
+	#
482
+	#	Note that load balancing does not work well with EAP,
483
+	#	as EAP requires packets for an EAP conversation to be
484
+	#	sent to the same home server.  The load balancing method
485
+	#	does not keep state in between packets, meaning that
486
+	#	EAP packets for the same conversation may be sent to
487
+	#	different home servers.  This will prevent EAP from
488
+	#	working.
489
+	#
490
+	#	For non-EAP authentication methods, and for accounting
491
+	#	packets, we recommend using "load-balance".  It will
492
+	#	ensure the highest availability for your network.
493
+	#
494
+	#  client-balance - the home server is chosen by hashing the
495
+	#	source IP address of the packet.  If that home server
496
+	#	is down, the next one in the list is used, just as
497
+	#	with "fail-over".
498
+	#
499
+	#	There is no way of predicting which source IP will map
500
+	#	to which home server.
501
+	#
502
+	#	This configuration is most useful to do simple load
503
+	#	balancing for EAP sessions, as the EAP session will
504
+	#	always be sent to the same home server.
505
+	#
506
+	#  client-port-balance - the home server is chosen by hashing
507
+	#	the source IP address and source port of the packet.
508
+	#	If that home server is down, the next one in the list
509
+	#	is used, just as with "fail-over".
510
+	#
511
+	#	This method provides slightly better load balancing
512
+	#	for EAP sessions than "client-balance".  However, it
513
+	#	also means that authentication and accounting packets
514
+	#	for the same session MAY go to different home servers.
515
+	#
516
+	#  keyed-balance - the home server is chosen by hashing (FNV)
517
+	#	the contents of the Load-Balance-Key attribute from the
518
+	#	control items.  The  request is then sent to home server
519
+	#	chosen by taking:
520
+	#
521
+	#		server = (hash % num_servers_in_pool).
522
+	#
523
+	#	If there is no Load-Balance-Key in the control items,
524
+	#	the load balancing method is identical to "load-balance".
525
+	#
526
+	#	For most non-EAP authentication methods, The User-Name
527
+	#	attribute provides a good key.  An "unlang" policy can
528
+	#	be used to copy the User-Name to the Load-Balance-Key
529
+	#	attribute.  This method may not work for EAP sessions,
530
+	#	as the User-Name outside of the TLS tunnel is often
531
+	#	static, e.g. "anonymous@realm".
532
+	#
533
+	#
534
+	#  The default type is fail-over.
535
+	type = fail-over
536
+
537
+	#
538
+	#  A virtual_server may be specified here.  If so, the
539
+	#  "pre-proxy" and "post-proxy" sections are called when
540
+	#  the request is proxied, and when a response is received.
541
+	#
542
+	#  This lets you have one policy for all requests that are proxied
543
+	#  to a home server.  This policy is completely independent of
544
+	#  any policies used to receive, or process the request.
545
+	#
546
+	#virtual_server = pre_post_proxy_for_pool
547
+
548
+	#
549
+	#  Next, a list of one or more home servers.  The names
550
+	#  of the home servers are NOT the hostnames, but the names
551
+	#  of the sections.  (e.g. home_server foo {...} has name "foo".
552
+	#
553
+	#  Note that ALL home servers listed here have to be of the same
554
+	#  type.  i.e. they all have to be "auth", or they all have to
555
+	#  be "acct", or the all have to be "auth+acct".
556
+	#
557
+	home_server = localhost
558
+
559
+	#  Additional home servers can be listed.
560
+	#  There is NO LIMIT to the number of home servers that can
561
+	#  be listed, though using more than 10 or so will become
562
+	#  difficult to manage.
563
+	#
564
+	# home_server = foo.example.com
565
+	# home_server = bar.example.com
566
+	# home_server = baz.example.com
567
+	# home_server = ...
568
+
569
+
570
+	#
571
+	#  If ALL home servers are dead, then this "fallback" home server
572
+	#  is used.  If set, it takes precedence over any realm-based
573
+	#  fallback, such as the DEFAULT realm.
574
+	#
575
+	#  For reasons of stability, this home server SHOULD be a virtual
576
+	#  server.  Otherwise, the fallback may itself be dead!
577
+	#
578
+	#fallback = virtual.example.com
579
+}
580
+
581
+######################################################################
582
+#
583
+#
584
+#  This section defines a new-style "realm".  Note the in version 2.0,
585
+#  there are many fewer configuration items than in 1.x for a realm.
586
+#
587
+#  Automatic proxying is done via the "realms" module (see "man
588
+#  rlm_realm").  To manually proxy the request put this entry in the
589
+#  "users" file:
590
+
591
+#
592
+#
593
+#DEFAULT	Proxy-To-Realm := "realm_name"
594
+#
595
+#
596
+realm example.com {
597
+	#
598
+	#  Realms point to pools of home servers.
599
+#
600
+	#  For authentication, the "auth_pool" configuration item
601
+	#  should point to a "home_server_pool" that was previously
602
+	#  defined.  All of the home servers in the "auth_pool" must
603
+	#  be of type "auth".
604
+	#
605
+	#  For accounting, the "acct_pool" configuration item
606
+	#  should point to a "home_server_pool" that was previously
607
+	#  defined.  All of the home servers in the "acct_pool" must
608
+	#  be of type "acct".
609
+	#
610
+	#  If you have a "home_server_pool" where all of the home servers
611
+	#  are of type "auth+acct", you can just use the "pool"
612
+	#  configuration item, instead of specifying both "auth_pool"
613
+	#  and "acct_pool".
614
+
615
+	auth_pool = my_auth_failover
616
+#	acct_pool = acct
617
+
618
+	#
619
+	#  Normally, when an incoming User-Name is matched against the
620
+	#  realm, the realm name is "stripped" off, and the "stripped"
621
+	#  user name is used to perform matches.
622
+	#
623
+	#  e.g. User-Name = "bob@example.com" will result in two new
624
+	#  attributes being created by the "realms" module:
625
+	#
626
+	#	Stripped-User-Name = "bob"
627
+	#	Realm = "example.com"
628
+	#
629
+	#  The Stripped-User-Name is then used as a key in the "users"
630
+	#  file, for example.
631
+	#
632
+	#  If you do not want this to happen, uncomment "nostrip" below.
633
+	#
634
+	# nostrip
635
+
636
+	#  There are no more configuration entries for a realm.
637
+}
638
+
639
+
640
+#
641
+#  This is a sample entry for iPass.
642
+#  Note that you have to define "ipass_auth_pool" and
643
+#  "ipass_acct_pool", along with home_servers for them, too.
644
+#
645
+#realm IPASS {
646
+#	nostrip
647
+#
648
+#	auth_pool = ipass_auth_pool
649
+#	acct_pool = ipass_acct_pool
650
+#}
651
+
652
+#
653
+#  This realm is used mainly to cancel proxying.  You can have
654
+#  the "realm suffix" module configured to proxy all requests for
655
+#  a realm, and then later cancel the proxying, based on other
656
+#  configuration.
657
+#
658
+#  For example, you want to terminate PEAP or EAP-TTLS locally,
659
+#  you can add the following to the "users" file:
660
+#
661
+#  DEFAULT EAP-Type == PEAP, Proxy-To-Realm := LOCAL
662
+#
663
+realm LOCAL {
664
+	#  If we do not specify a server pool, the realm is LOCAL, and
665
+	#  requests are not proxied to it.
666
+}
667
+
668
+#
669
+#  This realm is for requests which don't have an explicit realm
670
+#  prefix or suffix.  User names like "bob" will match this one.
671
+#
672
+#realm NULL {
673
+#	authhost	= radius.company.com:1600
674
+#	accthost	= radius.company.com:1601
675
+#	secret		= testing123
676
+#}
677
+
678
+#
679
+#  This realm is for ALL OTHER requests.
680
+#
681
+#realm DEFAULT {
682
+#	authhost	= radius.company.com:1600
683
+#	accthost	= radius.company.com:1601
684
+#	secret		= testing123
685
+#}
686
+
687
+
688
+#  This realm "proxies" requests internally to a virtual server.
689
+#  The pre-proxy and post-proxy sections are run just as with any
690
+#  other kind of home server.  The virtual server then receives
691
+#  the request, and replies, just as with any other packet.
692
+#
693
+#  Once proxied internally like this, the request CANNOT be proxied
694
+#  internally or externally.
695
+#
696
+#realm virtual.example.com {
697
+#	virtual_server = virtual.example.com
698
+#}
699
+#
700
+
701
+#
702
+#  Regular expressions may also be used as realm names.  If these are used,
703
+#  then the "find matching realm" process is as follows:
704
+#
705
+#    1) Look for a non-regex realm with an *exact* match for the name.
706
+#       If found, it is used in preference to any regex matching realm.
707
+#
708
+#    2) Look for a regex realm, in the order that they are listed
709
+#       in the configuration files.  Any regex match is performed in
710
+#	a case-insensitive fashion.
711
+#
712
+#    3) If no realm is found, return the DEFAULT realm, if any.
713
+#
714
+#  The order of the realms matters in step (2).  For example, defining
715
+#  two realms ".*\.example.net$" and ".*\.test\.example\.net$" will result in
716
+#  the second realm NEVER matching.  This is because all of the realms
717
+#  which match the second regex also match the first one.  Since the
718
+#  first regex matches, it is returned.
719
+#
720
+#  The solution is to list the realms in the opposite order,. e.g.
721
+#  ".*\.test\.example.net$", followed by ".*\.example\.net$".
722
+#
723
+#
724
+#  Some helpful rules:
725
+#
726
+#   - always place a '~' character at the start of the realm name.
727
+#     This signifies that it is a regex match, and not an exact match
728
+#     for the realm.
729
+#
730
+#   - place the regex in double quotes.  This helps the configuration
731
+#     file parser ignore any "special" characters in the regex.
732
+#     Yes, this rule is different than the normal "unlang" rules for
733
+#     regular expressions.  That may be fixed in a future release.
734
+#
735
+#   - use two back-slashes '\\' whenever you need one backslash in the
736
+#     regex.  e.g. "~.*\\.example\\.net$", and not "~\.example\.net$".
737
+#     This is because the regex is in a double-quoted string, and normal
738
+#     rules apply for double-quoted strings.
739
+#
740
+#   - If you are matching domain names, use two backslashes in front of
741
+#     every '.' (dot or period).  This is because '.' has special meaning
742
+#     in a regular expression: match any character.  If you do not do this,
743
+#     then "~.*.example.net$" will match "fooXexampleYnet", which is likely
744
+#     not what you want
745
+#
746
+#   - If you are matching domain names, put a '$' at the end of the regex
747
+#     that matches the domain name.  This tells the regex matching code
748
+#     that the realm ENDS with the domain name, so it does not match
749
+#     realms with the domain name in the middle.  e.g. "~.*\\.example\\.net"
750
+#     will match "test.example.netFOO", which is likely not what you want.
751
+#     Using "~(.*\\.)example\\.net$" is better.
752
+#
753
+#  The more regex realms that are defined, the more time it takes to
754
+#  process them.  You should define as few regex realms as possible
755
+#  in order to maximize server performance.
756
+#
757
+#realm "~(.*\\.)*example\\.net$" {
758
+#      auth_pool = my_auth_failover
759
+#}

+ 865
- 0
freeradius/config/tmp/freeradius/radiusd.conf View File

@@ -0,0 +1,865 @@
1
+# -*- text -*-
2
+##
3
+## radiusd.conf	-- FreeRADIUS server configuration file.
4
+##
5
+##	http://www.freeradius.org/
6
+##	$Id: 201b70b31b5bb4c2ef98c102690daa3462d5e1e3 $
7
+##
8
+
9
+######################################################################
10
+#
11
+#	Read "man radiusd" before editing this file.  See the section
12
+#	titled DEBUGGING.  It outlines a method where you can quickly
13
+#	obtain the configuration you want, without running into
14
+#	trouble.
15
+#
16
+#	Run the server in debugging mode, and READ the output.
17
+#
18
+#		$ radiusd -X
19
+#
20
+#	We cannot emphasize this point strongly enough.  The vast
21
+#	majority of problems can be solved by carefully reading the
22
+#	debugging output, which includes warnings about common issues,
23
+#	and suggestions for how they may be fixed.
24
+#
25
+#	There may be a lot of output, but look carefully for words like:
26
+#	"warning", "error", "reject", or "failure".  The messages there
27
+#	will usually be enough to guide you to a solution.
28
+#
29
+#	If you are going to ask a question on the mailing list, then
30
+#	explain what you are trying to do, and include the output from
31
+#	debugging mode (radiusd -X).  Failure to do so means that all
32
+#	of the responses to your question will be people telling you
33
+#	to "post the output of radiusd -X".
34
+
35
+######################################################################
36
+#
37
+#  	The location of other config files and logfiles are declared
38
+#  	in this file.
39
+#
40
+#  	Also general configuration for modules can be done in this
41
+#  	file, it is exported through the API to modules that ask for
42
+#  	it.
43
+#
44
+#	See "man radiusd.conf" for documentation on the format of this
45
+#	file.  Note that the individual configuration items are NOT
46
+#	documented in that "man" page.  They are only documented here,
47
+#	in the comments.
48
+#
49
+#	As of 2.0.0, FreeRADIUS supports a simple processing language
50
+#	in the "authorize", "authenticate", "accounting", etc. sections.
51
+#	See "man unlang" for details.
52
+#
53
+
54
+prefix = /usr
55
+exec_prefix = /usr
56
+sysconfdir = /etc
57
+localstatedir = /var
58
+sbindir = ${exec_prefix}/sbin
59
+logdir = /var/log/freeradius
60
+raddbdir = /etc/freeradius
61
+radacctdir = ${logdir}/radacct
62
+
63
+#
64
+#  name of the running server.  See also the "-n" command-line option.
65
+name = freeradius
66
+
67
+#  Location of config and logfiles.
68
+confdir = ${raddbdir}
69
+run_dir = ${localstatedir}/run/${name}
70
+
71
+# Should likely be ${localstatedir}/lib/radiusd
72
+db_dir = ${raddbdir}
73
+
74
+#
75
+# libdir: Where to find the rlm_* modules.
76
+#
77
+#   This should be automatically set at configuration time.
78
+#
79
+#   If the server builds and installs, but fails at execution time
80
+#   with an 'undefined symbol' error, then you can use the libdir
81
+#   directive to work around the problem.
82
+#
83
+#   The cause is usually that a library has been installed on your
84
+#   system in a place where the dynamic linker CANNOT find it.  When
85
+#   executing as root (or another user), your personal environment MAY
86
+#   be set up to allow the dynamic linker to find the library.  When
87
+#   executing as a daemon, FreeRADIUS MAY NOT have the same
88
+#   personalized configuration.
89
+#
90
+#   To work around the problem, find out which library contains that symbol,
91
+#   and add the directory containing that library to the end of 'libdir',
92
+#   with a colon separating the directory names.  NO spaces are allowed.
93
+#
94
+#   e.g. libdir = /usr/local/lib:/opt/package/lib
95
+#
96
+#   You can also try setting the LD_LIBRARY_PATH environment variable
97
+#   in a script which starts the server.
98
+#
99
+#   If that does not work, then you can re-configure and re-build the
100
+#   server to NOT use shared libraries, via:
101
+#
102
+#	./configure --disable-shared
103
+#	make
104
+#	make install
105
+#
106
+libdir = /usr/lib/freeradius
107
+
108
+#  pidfile: Where to place the PID of the RADIUS server.
109
+#
110
+#  The server may be signalled while it's running by using this
111
+#  file.
112
+#
113
+#  This file is written when ONLY running in daemon mode.
114
+#
115
+#  e.g.:  kill -HUP `cat /var/run/radiusd/radiusd.pid`
116
+#
117
+pidfile = ${run_dir}/${name}.pid
118
+
119
+#  chroot: directory where the server does "chroot".
120
+#
121
+#  The chroot is done very early in the process of starting the server.
122
+#  After the chroot has been performed it switches to the "user" listed
123
+#  below (which MUST be specified).  If "group" is specified, it switchs
124
+#  to that group, too.  Any other groups listed for the specified "user"
125
+#  in "/etc/group" are also added as part of this process.
126
+#
127
+#  The current working directory (chdir / cd) is left *outside* of the
128
+#  chroot until all of the modules have been initialized.  This allows
129
+#  the "raddb" directory to be left outside of the chroot.  Once the
130
+#  modules have been initialized, it does a "chdir" to ${logdir}.  This
131
+#  means that it should be impossible to break out of the chroot.
132
+#
133
+#  If you are worried about security issues related to this use of chdir,
134
+#  then simply ensure that the "raddb" directory is inside of the chroot,
135
+#  end be sure to do "cd raddb" BEFORE starting the server.
136
+#
137
+#  If the server is statically linked, then the only files that have
138
+#  to exist in the chroot are ${run_dir} and ${logdir}.  If you do the
139
+#  "cd raddb" as discussed above, then the "raddb" directory has to be
140
+#  inside of the chroot directory, too.
141
+#
142
+#chroot = /path/to/chroot/directory
143
+
144
+# user/group: The name (or #number) of the user/group to run radiusd as.
145
+#
146
+#   If these are commented out, the server will run as the user/group
147
+#   that started it.  In order to change to a different user/group, you
148
+#   MUST be root ( or have root privleges ) to start the server.
149
+#
150
+#   We STRONGLY recommend that you run the server with as few permissions
151
+#   as possible.  That is, if you're not using shadow passwords, the
152
+#   user and group items below should be set to radius'.
153
+#
154
+#  NOTE that some kernels refuse to setgid(group) when the value of
155
+#  (unsigned)group is above 60000; don't use group nobody on these systems!
156
+#
157
+#  On systems with shadow passwords, you might have to set 'group = shadow'
158
+#  for the server to be able to read the shadow password file.  If you can
159
+#  authenticate users while in debug mode, but not in daemon mode, it may be
160
+#  that the debugging mode server is running as a user that can read the
161
+#  shadow info, and the user listed below can not.
162
+#
163
+#  The server will also try to use "initgroups" to read /etc/groups.
164
+#  It will join all groups where "user" is a member.  This can allow
165
+#  for some finer-grained access controls.
166
+#
167
+user = freerad
168
+group = freerad
169
+
170
+#  panic_action: Command to execute if the server dies unexpectedly.
171
+#
172
+#  FOR PRODUCTION SYSTEMS, ACTIONS SHOULD ALWAYS EXIT.
173
+#  AN INTERACTIVE ACTION MEANS THE SERVER IS NOT RESPONDING TO REQUESTS.
174
+#  AN INTERACTICE ACTION MEANS THE SERVER WILL NOT RESTART.
175
+#
176
+#  The panic action is a command which will be executed if the server
177
+#  receives a fatal, non user generated signal, i.e. SIGSEGV, SIGBUS,
178
+#  SIGABRT or SIGFPE.
179
+#
180
+#  This can be used to start an interactive debugging session so
181
+#  that information regarding the current state of the server can
182
+#  be acquired.
183
+#
184
+#  The following string substitutions are available:
185
+#  - %e   The currently executing program e.g. /sbin/radiusd
186
+#  - %p   The PID of the currently executing program e.g. 12345
187
+#
188
+#  Standard ${} substitutions are also allowed.
189
+#
190
+#  An example panic action for opening an interactive session in GDB would be:
191
+#
192
+#panic_action = "gdb %e %p"
193
+#
194
+#  Again, don't use that on a production system.
195
+#
196
+#  An example panic action for opening an automated session in GDB would be:
197
+#
198
+#panic_action = "gdb -silent -x ${raddbdir}/panic.gdb %e %p > ${logdir}/gdb-%e-%p.log 2>&1"
199
+#
200
+#  That command can be used on a production system.
201
+#
202
+
203
+#  max_request_time: The maximum time (in seconds) to handle a request.
204
+#
205
+#  Requests which take more time than this to process may be killed, and
206
+#  a REJECT message is returned.
207
+#
208
+#  WARNING: If you notice that requests take a long time to be handled,
209
+#  then this MAY INDICATE a bug in the server, in one of the modules
210
+#  used to handle a request, OR in your local configuration.
211
+#
212
+#  This problem is most often seen when using an SQL database.  If it takes
213
+#  more than a second or two to receive an answer from the SQL database,
214
+#  then it probably means that you haven't indexed the database.  See your
215
+#  SQL server documentation for more information.
216
+#
217
+#  Useful range of values: 5 to 120
218
+#
219
+max_request_time = 30
220
+
221
+#  cleanup_delay: The time to wait (in seconds) before cleaning up
222
+#  a reply which was sent to the NAS.
223
+#
224
+#  The RADIUS request is normally cached internally for a short period
225
+#  of time, after the reply is sent to the NAS.  The reply packet may be
226
+#  lost in the network, and the NAS will not see it.  The NAS will then
227
+#  re-send the request, and the server will respond quickly with the
228
+#  cached reply.
229
+#
230
+#  If this value is set too low, then duplicate requests from the NAS
231
+#  MAY NOT be detected, and will instead be handled as seperate requests.
232
+#
233
+#  If this value is set too high, then the server will cache too many
234
+#  requests, and some new requests may get blocked.  (See 'max_requests'.)
235
+#
236
+#  Useful range of values: 2 to 10
237
+#
238
+cleanup_delay = 5
239
+
240
+#  max_requests: The maximum number of requests which the server keeps
241
+#  track of.  This should be 256 multiplied by the number of clients.
242
+#  e.g. With 4 clients, this number should be 1024.
243
+#
244
+#  If this number is too low, then when the server becomes busy,
245
+#  it will not respond to any new requests, until the 'cleanup_delay'
246
+#  time has passed, and it has removed the old requests.
247
+#
248
+#  If this number is set too high, then the server will use a bit more
249
+#  memory for no real benefit.
250
+#
251
+#  If you aren't sure what it should be set to, it's better to set it
252
+#  too high than too low.  Setting it to 1000 per client is probably
253
+#  the highest it should be.
254
+#
255
+#  Useful range of values: 256 to infinity
256
+#
257
+max_requests = 1024
258
+
259
+#  listen: Make the server listen on a particular IP address, and send
260
+#  replies out from that address. This directive is most useful for
261
+#  hosts with multiple IP addresses on one interface.
262
+#
263
+#  If you want the server to listen on additional addresses, or on
264
+#  additionnal ports, you can use multiple "listen" sections.
265
+#
266
+#  Each section make the server listen for only one type of packet,
267
+#  therefore authentication and accounting have to be configured in
268
+#  different sections.
269
+#
270
+#  The server ignore all "listen" section if you are using '-i' and '-p'
271
+#  on the command line.
272
+#
273
+listen {
274
+	#  Type of packets to listen for.
275
+	#  Allowed values are:
276
+	#	auth	listen for authentication packets
277
+	#	acct	listen for accounting packets
278
+	#	proxy   IP to use for sending proxied packets
279
+	#	detail  Read from the detail file.  For examples, see
280
+	#               raddb/sites-available/copy-acct-to-home-server
281
+	#	status  listen for Status-Server packets.  For examples,
282
+	#		see raddb/sites-available/status
283
+	#	coa     listen for CoA-Request and Disconnect-Request
284
+	#		packets.  For examples, see the file
285
+	#		raddb/sites-available/coa
286
+	#
287
+	type = auth
288
+
289
+	#  Note: "type = proxy" lets you control the source IP used for
290
+	#        proxying packets, with some limitations:
291
+	#
292
+	#    * A proxy listener CANNOT be used in a virtual server section.
293
+	#    * You should probably set "port = 0".
294
+	#    * Any "clients" configuration will be ignored.
295
+	#
296
+	#  See also proxy.conf, and the "src_ipaddr" configuration entry
297
+	#  in the sample "home_server" section.  When you specify the
298
+	#  source IP address for packets sent to a home server, the
299
+	#  proxy listeners are automatically created.
300
+
301
+	#  IP address on which to listen.
302
+	#  Allowed values are:
303
+	#	dotted quad (1.2.3.4)
304
+	#       hostname    (radius.example.com)
305
+	#       wildcard    (*)
306
+	ipaddr = *
307
+
308
+	#  OR, you can use an IPv6 address, but not both
309
+	#  at the same time.
310
+#	ipv6addr = ::	# any.  ::1 == localhost
311
+
312
+	#  Port on which to listen.
313
+	#  Allowed values are:
314
+	#	integer port number (1812)
315
+	#	0 means "use /etc/services for the proper port"
316
+	port = 0
317
+
318
+	#  Some systems support binding to an interface, in addition
319
+	#  to the IP address.  This feature isn't strictly necessary,
320
+	#  but for sites with many IP addresses on one interface,
321
+	#  it's useful to say "listen on all addresses for eth0".
322
+	#
323
+	#  If your system does not support this feature, you will
324
+	#  get an error if you try to use it.
325
+	#
326
+#	interface = eth0
327
+
328
+	#  Per-socket lists of clients.  This is a very useful feature.
329
+	#
330
+	#  The name here is a reference to a section elsewhere in
331
+	#  radiusd.conf, or clients.conf.  Having the name as
332
+	#  a reference allows multiple sockets to use the same
333
+	#  set of clients.
334
+	#
335
+	#  If this configuration is used, then the global list of clients
336
+	#  is IGNORED for this "listen" section.  Take care configuring
337
+	#  this feature, to ensure you don't accidentally disable a
338
+	#  client you need.
339
+	#
340
+	#  See clients.conf for the configuration of "per_socket_clients".
341
+	#
342
+#	clients = per_socket_clients
343
+}
344
+
345
+#  This second "listen" section is for listening on the accounting
346
+#  port, too.
347
+#
348
+listen {
349
+	ipaddr = *
350
+#	ipv6addr = ::
351
+	port = 0
352
+	type = acct
353
+#	interface = eth0
354
+#	clients = per_socket_clients
355
+}
356
+
357
+#  hostname_lookups: Log the names of clients or just their IP addresses
358
+#  e.g., www.freeradius.org (on) or 206.47.27.232 (off).
359
+#
360
+#  The default is 'off' because it would be overall better for the net
361
+#  if people had to knowingly turn this feature on, since enabling it
362
+#  means that each client request will result in AT LEAST one lookup
363
+#  request to the nameserver.   Enabling hostname_lookups will also
364
+#  mean that your server may stop randomly for 30 seconds from time
365
+#  to time, if the DNS requests take too long.
366
+#
367
+#  Turning hostname lookups off also means that the server won't block
368
+#  for 30 seconds, if it sees an IP address which has no name associated
369
+#  with it.
370
+#
371
+#  allowed values: {no, yes}
372
+#
373
+hostname_lookups = no
374
+
375
+#  Core dumps are a bad thing.  This should only be set to 'yes'
376
+#  if you're debugging a problem with the server.
377
+#
378
+#  allowed values: {no, yes}
379
+#
380
+allow_core_dumps = no
381
+
382
+#  Regular expressions
383
+#
384
+#  These items are set at configure time.  If they're set to "yes",
385
+#  then setting them to "no" turns off regular expression support.
386
+#
387
+#  If they're set to "no" at configure time, then setting them to "yes"
388
+#  WILL NOT WORK.  It will give you an error.
389
+#
390
+regular_expressions	= yes
391
+extended_expressions	= yes
392
+
393
+#
394
+#  Logging section.  The various "log_*" configuration items
395
+#  will eventually be moved here.
396
+#
397
+log {
398
+	#
399
+	#  Destination for log messages.  This can be one of:
400
+	#
401
+	#	files - log to "file", as defined below.
402
+	#	syslog - to syslog (see also the "syslog_facility", below.
403
+	#	stdout - standard output
404
+	#	stderr - standard error.
405
+	#
406
+	#  The command-line option "-X" over-rides this option, and forces
407
+	#  logging to go to stdout.
408
+	#
409
+	destination = files
410
+
411
+	#
412
+	#  The logging messages for the server are appended to the
413
+	#  tail of this file if destination == "files"
414
+	#
415
+	#  If the server is running in debugging mode, this file is
416
+	#  NOT used.
417
+	#
418
+	file = ${logdir}/radius.log
419
+
420
+	#
421
+	#  If this configuration parameter is set, then log messages for
422
+	#  a *request* go to this file, rather than to radius.log.
423
+	#
424
+	#  i.e. This is a log file per request, once the server has accepted
425
+	#  the request as being from a valid client.  Messages that are
426
+	#  not associated with a request still go to radius.log.
427
+	#
428
+	#  Not all log messages in the server core have been updated to use
429
+	#  this new internal API.  As a result, some messages will still
430
+	#  go to radius.log.  Please submit patches to fix this behavior.
431
+	#
432
+	#  The file name is expanded dynamically.  You should ONLY user
433
+	#  server-side attributes for the filename (e.g. things you control).
434
+	#  Using this feature MAY also slow down the server substantially,
435
+	#  especially if you do thinks like SQL calls as part of the
436
+	#  expansion of the filename.
437
+	#
438
+	#  The name of the log file should use attributes that don't change
439
+	#  over the lifetime of a request, such as User-Name,
440
+	#  Virtual-Server or Packet-Src-IP-Address.  Otherwise, the log
441
+	#  messages will be distributed over multiple files.
442
+	#
443
+	#  Logging can be enabled for an individual request by a special
444
+	#  dynamic expansion macro:  %{debug: 1}, where the debug level
445
+	#  for this request is set to '1' (or 2, 3, etc.).  e.g.
446
+	#
447
+	#	...
448
+	#	update control {
449
+	#	       Tmp-String-0 = "%{debug:1}"
450
+	#	}
451
+	#	...
452
+	#
453
+	#  The attribute that the value is assigned to is unimportant,
454
+	#  and should be a "throw-away" attribute with no side effects.
455
+	#
456
+	#requests = ${logdir}/radiusd-%{%{Virtual-Server}:-DEFAULT}-%Y%m%d.log
457
+
458
+	#
459
+	#  Which syslog facility to use, if ${destination} == "syslog"
460
+	#
461
+	#  The exact values permitted here are OS-dependent.  You probably
462
+	#  don't want to change this.
463
+	#
464
+	syslog_facility = daemon
465
+
466
+	#  Log the full User-Name attribute, as it was found in the request.
467
+	#
468
+	# allowed values: {no, yes}
469
+	#
470
+	stripped_names = no
471
+
472
+	#  Log authentication requests to the log file.
473
+	#
474
+	#  allowed values: {no, yes}
475
+	#
476
+	auth = no
477
+
478
+	#  Log passwords with the authentication requests.
479
+	#  auth_badpass  - logs password if it's rejected
480
+	#  auth_goodpass - logs password if it's correct
481
+	#
482
+	#  allowed values: {no, yes}
483
+	#
484
+	auth_badpass = no
485
+	auth_goodpass = no
486
+
487
+	#  Log additional text at the end of the "Login OK" messages.
488
+	#  for these to work, the "auth" and "auth_goopass" or "auth_badpass"
489
+	#  configurations above have to be set to "yes".
490
+	#
491
+	#  The strings below are dynamically expanded, which means that
492
+	#  you can put anything you want in them.  However, note that
493
+	#  this expansion can be slow, and can negatively impact server
494
+	#  performance.
495
+	#
496
+#	msg_goodpass = ""
497
+#	msg_badpass = ""
498
+}
499
+
500
+#  The program to execute to do concurrency checks.
501
+checkrad = ${sbindir}/checkrad
502
+
503
+# SECURITY CONFIGURATION
504
+#
505
+#  There may be multiple methods of attacking on the server.  This
506
+#  section holds the configuration items which minimize the impact
507
+#  of those attacks
508
+#
509
+security {
510
+	#
511
+	#  max_attributes: The maximum number of attributes
512
+	#  permitted in a RADIUS packet.  Packets which have MORE
513
+	#  than this number of attributes in them will be dropped.
514
+	#
515
+	#  If this number is set too low, then no RADIUS packets
516
+	#  will be accepted.
517
+	#
518
+	#  If this number is set too high, then an attacker may be
519
+	#  able to send a small number of packets which will cause
520
+	#  the server to use all available memory on the machine.
521
+	#
522
+	#  Setting this number to 0 means "allow any number of attributes"
523
+	max_attributes = 200
524
+
525
+	#
526
+	#  reject_delay: When sending an Access-Reject, it can be
527
+	#  delayed for a few seconds.  This may help slow down a DoS
528
+	#  attack.  It also helps to slow down people trying to brute-force
529
+	#  crack a users password.
530
+	#
531
+	#  Setting this number to 0 means "send rejects immediately"
532
+	#
533
+	#  If this number is set higher than 'cleanup_delay', then the
534
+	#  rejects will be sent at 'cleanup_delay' time, when the request
535
+	#  is deleted from the internal cache of requests.
536
+	#
537
+	#  Useful ranges: 1 to 5
538
+	reject_delay = 1
539
+
540
+	#
541
+	#  status_server: Whether or not the server will respond
542
+	#  to Status-Server requests.
543
+	#
544
+	#  When sent a Status-Server message, the server responds with
545
+	#  an Access-Accept or Accounting-Response packet.
546
+	#
547
+	#  This is mainly useful for administrators who want to "ping"
548
+	#  the server, without adding test users, or creating fake
549
+	#  accounting packets.
550
+	#
551
+	#  It's also useful when a NAS marks a RADIUS server "dead".
552
+	#  The NAS can periodically "ping" the server with a Status-Server
553
+	#  packet.  If the server responds, it must be alive, and the
554
+	#  NAS can start using it for real requests.
555
+	#
556
+	#  See also raddb/sites-available/status
557
+	#
558
+	status_server = yes
559
+
560
+	#
561
+	#  allow_vulnerable_openssl: Allow the server to start with
562
+	#  versions of OpenSSL known to have critical vulnerabilities.
563
+	#
564
+	#  This check is based on the version number reported by libssl
565
+	#  and may not reflect patches applied to libssl by
566
+	#  distribution maintainers.
567
+	#
568
+	allow_vulnerable_openssl = no
569
+}
570
+
571
+# PROXY CONFIGURATION
572
+#
573
+#  proxy_requests: Turns proxying of RADIUS requests on or off.
574
+#
575
+#  The server has proxying turned on by default.  If your system is NOT
576
+#  set up to proxy requests to another server, then you can turn proxying
577
+#  off here.  This will save a small amount of resources on the server.
578
+#
579
+#  If you have proxying turned off, and your configuration files say
580
+#  to proxy a request, then an error message will be logged.
581
+#
582
+#  To disable proxying, change the "yes" to "no", and comment the
583
+#  $INCLUDE line.
584
+#
585
+#  allowed values: {no, yes}
586
+#
587
+proxy_requests  = yes
588
+$INCLUDE proxy.conf
589
+
590
+
591
+# CLIENTS CONFIGURATION
592
+#
593
+#  Client configuration is defined in "clients.conf".
594
+#
595
+
596
+#  The 'clients.conf' file contains all of the information from the old
597
+#  'clients' and 'naslist' configuration files.  We recommend that you
598
+#  do NOT use 'client's or 'naslist', although they are still
599
+#  supported.
600
+#
601
+#  Anything listed in 'clients.conf' will take precedence over the
602
+#  information from the old-style configuration files.
603
+#
604
+$INCLUDE clients.conf
605
+
606
+
607
+# THREAD POOL CONFIGURATION
608
+#
609
+#  The thread pool is a long-lived group of threads which
610
+#  take turns (round-robin) handling any incoming requests.
611
+#
612
+#  You probably want to have a few spare threads around,
613
+#  so that high-load situations can be handled immediately.  If you
614
+#  don't have any spare threads, then the request handling will
615
+#  be delayed while a new thread is created, and added to the pool.
616
+#
617
+#  You probably don't want too many spare threads around,
618
+#  otherwise they'll be sitting there taking up resources, and
619
+#  not doing anything productive.
620
+#
621
+#  The numbers given below should be adequate for most situations.
622
+#
623
+thread pool {
624
+	#  Number of servers to start initially --- should be a reasonable
625
+	#  ballpark figure.
626
+	start_servers = 5
627
+
628
+	#  Limit on the total number of servers running.
629
+	#
630
+	#  If this limit is ever reached, clients will be LOCKED OUT, so it
631
+	#  should NOT BE SET TOO LOW.  It is intended mainly as a brake to
632
+	#  keep a runaway server from taking the system with it as it spirals
633
+	#  down...
634
+	#
635
+	#  You may find that the server is regularly reaching the
636
+	#  'max_servers' number of threads, and that increasing
637
+	#  'max_servers' doesn't seem to make much difference.
638
+	#
639
+	#  If this is the case, then the problem is MOST LIKELY that
640
+	#  your back-end databases are taking too long to respond, and
641
+	#  are preventing the server from responding in a timely manner.
642
+	#
643
+	#  The solution is NOT do keep increasing the 'max_servers'
644
+	#  value, but instead to fix the underlying cause of the
645
+	#  problem: slow database, or 'hostname_lookups=yes'.
646
+	#
647
+	#  For more information, see 'max_request_time', above.
648
+	#
649
+	max_servers = 32
650
+
651
+	#  Server-pool size regulation.  Rather than making you guess
652
+	#  how many servers you need, FreeRADIUS dynamically adapts to
653
+	#  the load it sees, that is, it tries to maintain enough
654
+	#  servers to handle the current load, plus a few spare
655
+	#  servers to handle transient load spikes.
656
+	#
657
+	#  It does this by periodically checking how many servers are
658
+	#  waiting for a request.  If there are fewer than
659
+	#  min_spare_servers, it creates a new spare.  If there are
660
+	#  more than max_spare_servers, some of the spares die off.
661
+	#  The default values are probably OK for most sites.
662
+	#
663
+	min_spare_servers = 3
664
+	max_spare_servers = 10
665
+
666
+	#  When the server receives a packet, it places it onto an
667
+	#  internal queue, where the worker threads (configured above)
668
+	#  pick it up for processing.  The maximum size of that queue
669
+	#  is given here.
670
+	#
671
+	#  When the queue is full, any new packets will be silently
672
+	#  discarded.
673
+	#
674
+	#  The most common cause of the queue being full is that the
675
+	#  server is dependent on a slow database, and it has received
676
+	#  a large "spike" of traffic.  When that happens, there is
677
+	#  very little you can do other than make sure the server
678
+	#  receives less traffic, or make sure that the database can
679
+	#  handle the load.
680
+	#
681
+#	max_queue_size = 65536
682
+
683
+	#  There may be memory leaks or resource allocation problems with
684
+	#  the server.  If so, set this value to 300 or so, so that the
685
+	#  resources will be cleaned up periodically.
686
+	#
687
+	#  This should only be necessary if there are serious bugs in the
688
+	#  server which have not yet been fixed.
689
+	#
690
+	#  '0' is a special value meaning 'infinity', or 'the servers never
691
+	#  exit'
692
+	max_requests_per_server = 0
693
+}
694
+
695
+# MODULE CONFIGURATION
696
+#
697
+#  The names and configuration of each module is located in this section.
698
+#
699
+#  After the modules are defined here, they may be referred to by name,
700
+#  in other sections of this configuration file.
701
+#
702
+modules {
703
+	#
704
+	#  Each module has a configuration as follows:
705
+	#
706
+	#	name [ instance ] {
707
+	#		config_item = value
708
+	#		...
709
+	#	}
710
+	#
711
+	#  The 'name' is used to load the 'rlm_name' library
712
+	#  which implements the functionality of the module.
713
+	#
714
+	#  The 'instance' is optional.  To have two different instances
715
+	#  of a module, it first must be referred to by 'name'.
716
+	#  The different copies of the module are then created by
717
+	#  inventing two 'instance' names, e.g. 'instance1' and 'instance2'
718
+	#
719
+	#  The instance names can then be used in later configuration
720
+	#  INSTEAD of the original 'name'.  See the 'radutmp' configuration
721
+	#  for an example.
722
+	#
723
+
724
+	#
725
+	#  As of 2.0.5, most of the module configurations are in a
726
+	#  sub-directory.  Files matching the regex /[a-zA-Z0-9_.]+/
727
+	#  are loaded.  The modules are initialized ONLY if they are
728
+	#  referenced in a processing section, such as authorize,
729
+	#  authenticate, accounting, pre/post-proxy, etc.
730
+	#
731
+	$INCLUDE ${confdir}/modules/
732
+
733
+	#  Extensible Authentication Protocol
734
+	#
735
+	#  For all EAP related authentications.
736
+	#  Now in another file, because it is very large.
737
+	#
738
+	$INCLUDE eap.conf
739
+
740
+	#  Include another file that has the SQL-related configuration.
741
+	#  This is another file only because it tends to be big.
742
+	#
743
+#	$INCLUDE sql.conf
744
+
745
+	#
746
+	#  This module is an SQL enabled version of the counter module.
747
+	#
748
+	#  Rather than maintaining seperate (GDBM) databases of
749
+	#  accounting info for each counter, this module uses the data
750
+	#  stored in the raddacct table by the sql modules. This
751
+	#  module NEVER does any database INSERTs or UPDATEs.  It is
752
+	#  totally dependent on the SQL module to process Accounting
753
+	#  packets.
754
+	#
755
+#	$INCLUDE sql/mysql/counter.conf
756
+
757
+	#
758
+	#  IP addresses managed in an SQL table.
759
+	#
760
+#	$INCLUDE sqlippool.conf
761
+}
762
+
763
+# Instantiation
764
+#
765
+#  This section orders the loading of the modules.  Modules
766
+#  listed here will get loaded BEFORE the later sections like
767
+#  authorize, authenticate, etc. get examined.
768
+#
769
+#  This section is not strictly needed.  When a section like
770
+#  authorize refers to a module, it's automatically loaded and
771
+#  initialized.  However, some modules may not be listed in any
772
+#  of the following sections, so they can be listed here.
773
+#
774
+#  Also, listing modules here ensures that you have control over
775
+#  the order in which they are initalized.  If one module needs
776
+#  something defined by another module, you can list them in order
777
+#  here, and ensure that the configuration will be OK.
778
+#
779
+instantiate {
780
+	#
781
+	#  Allows the execution of external scripts.
782
+	#  The entire command line (and output) must fit into 253 bytes.
783
+	#
784
+	#  e.g. Framed-Pool = `%{exec:/bin/echo foo}`
785
+	exec
786
+
787
+	#
788
+	#  The expression module doesn't do authorization,
789
+	#  authentication, or accounting.  It only does dynamic
790
+	#  translation, of the form:
791
+	#
792
+	#	Session-Timeout = `%{expr:2 + 3}`
793
+	#
794
+	#  This module needs to be instantiated, but CANNOT be
795
+	#  listed in any other section.  See 'doc/rlm_expr' for
796
+	#  more information.
797
+	#
798
+	#  rlm_expr is also responsible for registering many
799
+	#  other xlat functions such as md5, sha1 and lc.
800
+	#
801
+	#  We do not recommend removing it's listing here.
802
+	expr
803
+
804
+	#
805
+	# We add the counter module here so that it registers
806
+	# the check-name attribute before any module which sets
807
+	# it
808
+#	daily
809
+	expiration
810
+	logintime
811
+
812
+	# subsections here can be thought of as "virtual" modules.
813
+	#
814
+	# e.g. If you have two redundant SQL servers, and you want to
815
+	# use them in the authorize and accounting sections, you could
816
+	# place a "redundant" block in each section, containing the
817
+	# exact same text.  Or, you could uncomment the following
818
+	# lines, and list "redundant_sql" in the authorize and
819
+	# accounting sections.
820
+	#
821
+	#redundant redundant_sql {
822
+	#	sql1
823
+	#	sql2
824
+	#}
825
+}
826
+
827
+######################################################################
828
+#
829
+#	Policies that can be applied in multiple places are listed
830
+#	globally.  That way, they can be defined once, and referred
831
+#	to multiple times.
832
+#
833
+######################################################################
834
+$INCLUDE policy.conf
835
+
836
+######################################################################
837
+#
838
+#	Load virtual servers.
839
+#
840
+#	This next $INCLUDE line loads files in the directory that
841
+#	match the regular expression: /[a-zA-Z0-9_.]+/
842
+#
843
+#	It allows you to define new virtual servers simply by placing
844
+#	a file into the raddb/sites-enabled/ directory.
845
+#
846
+$INCLUDE sites-enabled/
847
+
848
+######################################################################
849
+#
850
+#	All of the other configuration sections like "authorize {}",
851
+#	"authenticate {}", "accounting {}", have been moved to the
852
+#	the file:
853
+#
854
+#		raddb/sites-available/default
855
+#
856
+#	This is the "default" virtual server that has the same
857
+#	configuration as in version 1.0.x and 1.1.x.  The default
858
+#	installation enables this virtual server.  You should
859
+#	edit it to create policies for your local site.
860
+#
861
+#	For more documentation on virtual servers, see:
862
+#
863
+#		raddb/sites-available/README
864
+#
865
+######################################################################

+ 335
- 0
freeradius/config/tmp/freeradius/sites-available/README View File

@@ -0,0 +1,335 @@
1
+1.  Virtual Servers.
2
+
3
+  FreeRADIUS 2.0 supports virtual servers.  This is probably the
4
+single largest change that is NOT backwards compatible with 1.x.
5
+
6
+  The virtual servers do NOT have to be set up with the
7
+"sites-available" and "sites-enabled" directories.  You can still have
8
+one "radiusd.conf" file, and put the server configuration there:
9
+
10
+	...
11
+	server {
12
+		authorize {
13
+			...
14
+		}
15
+		authenticate {
16
+			...
17
+		}
18
+		...
19
+	}
20
+	...
21
+
22
+  The power of virtual servers lies in their ability to separate
23
+policies.  A policy can be placed into a virtual server, where it is
24
+guaranteed to affect only the requests that are passed through that
25
+virtual server.  In 1.x, the policies were global, and it sometimes
26
+took much effort to write a policy so that it only applied in certain
27
+limited situations.
28
+
29
+
30
+2.  What do we mean by "virtual server"?
31
+
32
+
33
+  A virtual server is a (nearly complete) RADIUS server, just like a
34
+configuration for FreeRADIUS 1.x.  However, FreeRADIUS can now run
35
+multiple virtual servers at the same time.  The virtual servers can
36
+even proxy requests to each other!
37
+
38
+  The simplest way to create a virtual server is to take the all of
39
+the request processing sections from radius.conf, ("authorize" ,
40
+"authenticate", etc.) and wrap them in a "server {}" block, as above.
41
+
42
+  You can create another virtual server by:
43
+
44
+    1) defining a new "server foo {...}" section in radiusd.conf
45
+    2) Putting the normal "authorize", etc. sections inside of it
46
+    3) Adding a "listen" section *inside* of the "server" section.
47
+
48
+  e.g.
49
+
50
+	...
51
+	server foo {
52
+		listen {
53
+			ipaddr = 127.0.0.1
54
+			port = 2000
55
+			type = auth
56
+		}
57
+
58
+		authorize {
59
+			update control {
60
+				Cleartext-Password := "bob"
61
+			}
62
+			pap
63
+		}
64
+
65
+		authenticate {
66
+			pap
67
+		}
68
+	}
69
+	...
70
+
71
+  With that text added to "radiusd.conf", run the server in debugging
72
+mode (radiusd -X), and in another terminal window, type:
73
+
74
+$ radtest bob bob localhost:2000 0 testing123
75
+
76
+  You should see the server return an Access-Accept.
77
+
78
+
79
+3. Capabilities and limitations
80
+
81
+
82
+  The only sub-sections that can appear in a virtual server section
83
+are:
84
+
85
+	listen
86
+	client
87
+	authorize
88
+	authenticate
89
+	post-auth
90
+	pre-proxy
91
+	post-proxy
92
+	preacct
93
+	accounting
94
+	session
95
+
96
+  All other configuration parameters (modules, etc.) are global.
97
+
98
+  Inside of a virtual server, the authorize, etc. sections have their
99
+normal meaning, and can contain anything that an authorize section
100
+could contain in 1.x.
101
+
102
+  When a "listen" section is inside of a virtual server definition, it
103
+means that all requests sent to that IP/port will be processed through
104
+the virtual server.  There cannot be two "listen" sections with the
105
+same IP address and port number.
106
+
107
+  When a "client" section is inside of a virtual server definition, it
108
+means that that client is known only to the "listen" sections that are
109
+also inside of that virtual server.  Not only is this client
110
+definition available only to this virtual server, but the details of
111
+the client configuration is also available only to this virtual
112
+server.
113
+
114
+  i.e. Two virtual servers can listen on different IP address and
115
+ports, but both can have a client with IP address 127.0.0.1.  The
116
+shared secret for that client can be different for each virtual
117
+server.
118
+
119
+
120
+4. More complex "listen" capabilities
121
+
122
+  The "listen" sections have a few additional configuration items that
123
+were not in 1.x, and were not mentioned above.  These configuration
124
+items enable almost any mapping of IP / port to clients to virtual
125
+servers.
126
+
127
+  The configuration items are:
128
+
129
+	virtual_server = <name>
130
+
131
+		If set, all requests sent to this IP / port are processed
132
+		through the named virtual server.
133
+
134
+		This directive can be used only for "listen" sections
135
+		that are global.  i.e. It CANNOT be used if the
136
+		"listen" section is inside of a virtual server.
137
+
138
+	clients = <name>
139
+
140
+		If set, the "listen" section looks for a "clients" section:
141
+
142
+			clients <name> {
143
+				...
144
+			}
145
+
146
+		It looks inside of that named "clients" section for
147
+		"client" subsections, at least one of which must
148
+		exist.  Each client in that section is added to the
149
+		list of known clients for this IP / port.  No other
150
+		clients are known.
151
+
152
+		If it is set, it over-rides the list of clients (if
153
+		any) in the same virtual server.  Note that the
154
+		clients are NOT additive!
155
+
156
+		If it is not set, then the clients from the current
157
+		virtual server (if any) are used.  If there are no
158
+		clients in this virtual server, then the global
159
+		clients are used.
160
+
161
+		i.e. The most specific directive is used:
162
+			* configuration in this "listen" section
163
+			* clients in the same virtual server
164
+			* global clients
165
+
166
+		The directives are also *exclusive*, not *additive*.
167
+		If you have one client in a virtual server, and
168
+		another client referenced from a "listen" section,
169
+		then that "listen" section will ONLY use the second
170
+		client.  It will NOT use both clients.
171
+
172
+
173
+5. More complex "client" capabilities
174
+
175
+  The "client" sections have a few additional configuration items that
176
+were not in 1.x, and were not mentioned above.  These configuration
177
+items enable almost any mapping of IP / port to clients to virtual
178
+servers.
179
+
180
+  The configuration items are:
181
+
182
+	virtual_server = <name>
183
+
184
+		If set, all requests from this client are processed
185
+		through the named virtual server.
186
+
187
+		This directive can be used only for "client" sections
188
+		that are global.  i.e. It CANNOT be used if the
189
+		"client" section is inside of a virtual server.
190
+
191
+  If the "listen" section has a "server" entry, and a matching
192
+client is found ALSO with a "server" entry, then the clients server is
193
+used for that request.
194
+
195
+
196
+6. Worked examples
197
+
198
+
199
+  Listening on one socket, and mapping requests from two clients to
200
+two different servers.
201
+
202
+	listen {
203
+		...
204
+	}
205
+	client one {
206
+		...
207
+		virtual_server = server_one
208
+	}
209
+	client two {
210
+		...
211
+		virtual_server = server_two
212
+	}
213
+	server server_one {
214
+		authorize {
215
+			...
216
+		}
217
+		...
218
+	}
219
+	server server_two {
220
+		authorize {
221
+			...
222
+		}
223
+		...
224
+	}
225
+
226
+  This could also be done as:
227
+
228
+
229
+	listen {
230
+		...
231
+		virtual_server = server_one
232
+	}
233
+	client one {
234
+		...
235
+	}
236
+	client two {
237
+		...
238
+		virtual_server = server_two
239
+	}
240
+	server server_one {
241
+		authorize {
242
+			...
243
+		}
244
+		...
245
+	}
246
+	server server_two {
247
+		authorize {
248
+			...
249
+		}
250
+		...
251
+	}
252
+
253
+  In this case, the default server for the socket is "server_one", so
254
+there is no need to set that in the client "one" configuration.  The
255
+"server_two" configuration for client "two" over-rides the default
256
+setting for the socket.
257
+
258
+  Note that the following configuration will NOT work:
259
+
260
+	listen {
261
+		...
262
+		virtual_server = server_one
263
+	}
264
+	client one {
265
+		...
266
+	}
267
+	server server_one {
268
+		authorize {
269
+			...
270
+		}
271
+		...
272
+	}
273
+	server server_two {
274
+		client two {
275
+			...
276
+		}
277
+		authorize {
278
+			...
279
+		}
280
+		...
281
+	}
282
+
283
+  In this example, client "two" is hidden inside of the virtual
284
+server, where the "listen" section cannot find it.
285
+
286
+
287
+7. Outlined examples
288
+
289
+  This section outlines a number of examples, with alternatives.
290
+
291
+  One server, multiple sockets
292
+	- multiple "listen" sections in a "server" section
293
+
294
+  one server per client
295
+	- define multiple servers
296
+	- have a global "listen" section
297
+	- have multiple global "clients", each with "virtual_server = X"
298
+
299
+  two servers, each with their own sockets
300
+	- define multiple servers
301
+	- put "client" sections into each "server"
302
+	- put a "listen" section into each "server"
303
+
304
+	Each server can list the same client IP, and the secret
305
+	can be different
306
+
307
+  two sockets, sharing a list of clients, but pointing to different servers
308
+	- define global "listen" sections
309
+	- in each, set "virtual_server = X"
310
+	- in each, set "clients = Y"
311
+	- define "clients Y" section, containing multiple clients.
312
+
313
+	This also means that you can have a third socket, which
314
+	doesn't share any of these clients.
315
+
316
+
317
+8.  How to decide what to do
318
+
319
+
320
+  If you want *completely* separate policies for a socket or a client,
321
+then create a separate virtual server.  Then, map the request to that
322
+server by setting configuration entries in a "listen" section or in a
323
+"client" section.
324
+
325
+  Start off with the common cases first.  If most of the clients
326
+and/or sockets get a particular policy, make that policy the default.
327
+Configure it without paying attention to the sockets or clients you
328
+want to add later, and without adding a second virtual server.  Once
329
+it works, then add the second virtual server.
330
+
331
+  If you want to re-use the previously defined sockets with the second
332
+virtual server, then you will need one or more global "client"
333
+sections.  Those clients will contain a "virtual_server = ..." entry
334
+that will direct requests from those clients to the appropriate
335
+virtual server.

+ 129
- 0
freeradius/config/tmp/freeradius/sites-available/buffered-sql View File

@@ -0,0 +1,129 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	In 2.0.0, radrelay functionality is integrated into the
5
+#	server core.  This virtual server gives an example of
6
+#	using radrelay functionality inside of the server.
7
+#
8
+#	In this example, the detail file is read, and the data
9
+#	is put into SQL.  This configuration is used when a RADIUS
10
+#	server on this machine is receiving accounting packets,
11
+#	and writing them to the detail file.
12
+#
13
+#	The purpose of this virtual server is to de-couple the storage
14
+#	of long-term accounting data in SQL from "live" information
15
+#	needed by the RADIUS server as it is running. 
16
+#
17
+#	The benefit of this approach is that for a busy server, the
18
+#	overhead of performing SQL qeuries may be significant.  Also,
19
+#	if the SQL databases are large (as is typical for ones storing
20
+#	months of data), the INSERTs and UPDATEs may take a relatively
21
+#	long time.  Rather than slowing down the RADIUS server by
22
+#	having it interact with a database, you can just log the
23
+#	packets to a detail file, and then read that file later at a
24
+#	time when the RADIUS server is typically lightly loaded.
25
+#
26
+#	If you use on virtual server to log to the detail file,
27
+#	and another virtual server (i.e. this one) to read from
28
+#	the detail file, then this process will happen automatically.
29
+#	A sudden spike of RADIUS traffic means that the detail file
30
+#	will grow in size, and the server will be able to handle
31
+#	large volumes of traffic quickly.  When the traffic dies down,
32
+#	the server will have time to read the detail file, and insert
33
+#	the data into a long-term SQL database.
34
+#
35
+#	$Id: 3f64cbb500cdda5014157e4776e871419f0b64df $
36
+#
37
+######################################################################
38
+
39
+server buffered-sql {
40
+	listen {
41
+		type = detail
42
+
43
+		#  The location where the detail file is located.
44
+		#  This should be on local disk, and NOT on an NFS
45
+		#  mounted location!
46
+		filename = "${radacctdir}/detail-*"
47
+
48
+		#
49
+		#  The server can read accounting packets from the
50
+		#  detail file much more quickly than those packets
51
+		#  can be written to a database.  If the database is
52
+		#  overloaded, then bad things can happen.
53
+		#
54
+		#  The server will keep track of how long it takes to
55
+		#  process an entry from the detail file.  It will
56
+		#  then pause between handling entries.  This pause
57
+		#  allows databases to "catch up", and gives the
58
+		#  server time to notice that other packets may have
59
+		#  arrived.
60
+		#		
61
+		#  The pause is calculated dynamically, to ensure that
62
+		#  the load due to reading the detail files is limited
63
+		#  to a small percentage of CPU time.  The
64
+		#  "load_factor" configuration item is a number
65
+		#  between 1 and 100.  The server will try to keep the
66
+		#  percentage of time taken by "detail" file entries
67
+		#  to "load_factor" percentage of the CPU time.
68
+		#
69
+		#  If the "load_factor" is set to 100, then the server
70
+		#  will read packets as fast as it can, usually
71
+		#  causing databases to go into overload.
72
+		#  
73
+		load_factor = 10
74
+
75
+		#
76
+		#  Set the interval for polling the detail file.
77
+		#  If the detail file doesn't exist, the server will
78
+		#  wake up, and poll for it every N seconds.
79
+		#
80
+		#  Useful range of values: 1 to 60
81
+		poll_interval = 1
82
+
83
+		#
84
+		#  Set the retry interval for when the home server
85
+		#  does not respond.  The current packet will be
86
+		#  sent repeatedly, at this interval, until the
87
+		#  home server responds.
88
+		#
89
+		#  Useful range of values: 5 to 30
90
+		retry_interval = 30
91
+
92
+	}
93
+
94
+	#
95
+	#  Pre-accounting.  Decide which accounting type to use.
96
+	#
97
+	preacct {
98
+		preprocess
99
+	
100
+		#
101
+		#  Ensure that we have a semi-unique identifier for every
102
+		#  request, and many NAS boxes are broken.
103
+		acct_unique
104
+	
105
+		#
106
+		#  Read the 'acct_users' file.  This isn't always
107
+		#  necessary, and can be deleted if you do not use it.
108
+		files
109
+	}
110
+	
111
+	#
112
+	#  Accounting.  Log the accounting data.
113
+	#
114
+	accounting {
115
+		#
116
+		#  Log traffic to an SQL database.
117
+		#
118
+		#  See "Accounting queries" in sql.conf
119
+	#	sql
120
+
121
+
122
+		#  Cisco VoIP specific bulk accounting
123
+	#	pgsql-voip
124
+	
125
+	}
126
+
127
+	# The requests are not being proxied, so no pre/post-proxy
128
+	# sections are necessary.
129
+}

+ 43
- 0
freeradius/config/tmp/freeradius/sites-available/coa View File

@@ -0,0 +1,43 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#  Sample virtual server for receiving a CoA or Disconnect-Request packet.
5
+#
6
+
7
+#  Listen on the CoA port.
8
+#
9
+#  This uses the normal set of clients, with the same secret as for
10
+#  authentication and accounting.
11
+#
12
+listen {
13
+	type = coa
14
+	ipaddr = *
15
+	port = 3799
16
+	server = coa
17
+}
18
+
19
+server coa {
20
+	#  When a packet is received, it is processed through the
21
+	#  recv-coa section.  This applies to *both* CoA-Request and
22
+	#  Disconnect-Request packets.
23
+	recv-coa {
24
+		#  CoA && Disconnect packets can be proxied in the same
25
+		#  way as authentication or accounting packets.
26
+		#  Just set Proxy-To-Realm, or Home-Server-Pool, and the
27
+		#  packets will be proxied.
28
+
29
+		#  Insert your own policies here.
30
+		ok
31
+	}
32
+
33
+	#  When a packet is sent, it is processed through the
34
+	#  recv-coa section.  This applies to *both* CoA-Request and
35
+	#  Disconnect-Request packets.
36
+	send-coa {
37
+		#  Sample module.
38
+		ok
39
+	}
40
+
41
+	#  You can use pre-proxy and post-proxy sections here, too.
42
+	#  They will be processed for sending && receiving proxy packets.
43
+}

+ 73
- 0
freeradius/config/tmp/freeradius/sites-available/control-socket View File

@@ -0,0 +1,73 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	Control socket interface.
5
+#
6
+#	In the future, we will add username/password checking for
7
+#	connections to the control socket.  We will also add
8
+#	command authorization, where the commands entered by the
9
+#	administrator are run through a virtual server before
10
+#	they are executed.
11
+#
12
+#	For now, anyone who has permission to connect to the socket
13
+#	has nearly complete control over the server.  Be warned!
14
+#
15
+#	This functionality is NOT enabled by default.
16
+#
17
+#	See also the "radmin" program, which is used to communicate
18
+#	with the server over the control socket.
19
+#
20
+#	$Id: 6a6f2b9428713083720b145d12c90b9747510ec1 $
21
+#
22
+######################################################################
23
+listen {
24
+	#
25
+	#  Listen on the control socket.
26
+	#
27
+	type = control
28
+
29
+	#
30
+	#  Socket location.
31
+	#
32
+	#  This file is created with the server's uid and gid.
33
+	#  It's permissions are r/w for that user and group, and
34
+	#  no permissions for "other" users.  These permissions form
35
+	#  minimal security, and should not be relied on.
36
+	#
37
+	socket = ${run_dir}/${name}.sock
38
+
39
+	#
40
+	#  The following two parameters perform authentication and
41
+	#  authorization of connections to the control socket.
42
+	#
43
+	#  If not set, then ANYONE can connect to the control socket,	
44
+	#  and have complete control over the server.  This is likely
45
+	#  not what you want.
46
+	#
47
+	#  One, or both, of "uid" and "gid" should be set.  If set, the
48
+	#  corresponding value is checked.  Unauthorized users result
49
+	#  in an error message in the log file, and the connection is
50
+	#  closed.
51
+	#
52
+
53
+	#
54
+	#  Name of user that is allowed to connect to the control socket.
55
+	#
56
+#	uid = radius
57
+
58
+	#
59
+	#  Name of group that is allowed to connect to the control socket.
60
+	#
61
+#	gid = radius
62
+
63
+	#
64
+	#  Access mode.
65
+	#
66
+	#  This can be used to give *some* administrators access to
67
+	#  monitor the system, but not to change it.
68
+	#
69
+	#	ro = read only access (default)
70
+	#	rw = read/write access.
71
+	#
72
+#	mode = rw
73
+}

+ 171
- 0
freeradius/config/tmp/freeradius/sites-available/copy-acct-to-home-server View File

@@ -0,0 +1,171 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	In 2.0.0, radrelay functionality is integrated into the
5
+#	server core.  This virtual server gives an example of
6
+#	using radrelay functionality inside of the server.
7
+#
8
+#	In this example, the detail file is read, and the packets
9
+#	are proxied to a home server.  You will have to configure
10
+#	realms, home_server_pool, and home_server in proxy.conf
11
+#	for this to work.
12
+#
13
+#	The purpose of this virtual server is to enable duplication
14
+#	of information across a load-balanced, or fail-over set of
15
+#	servers.  For example, if a group of clients lists two
16
+#	home servers (primary, secondary), then RADIUS accounting
17
+#	messages will go only to one server at a time.  This file
18
+#	configures a server (primary, secondary) to send copies of
19
+#	the accounting information to each other.
20
+#
21
+#	That way, each server has the same set of information, and
22
+#	can make the same decision about the user.
23
+#
24
+#	$Id: 5f9a522f0b02178a956f63145b6b43c427260ce0 $
25
+#
26
+######################################################################
27
+
28
+server copy-acct-to-home-server {
29
+	listen {
30
+		type = detail
31
+
32
+		######################################################
33
+		#
34
+		#  !!!! WARNING !!!!
35
+		#
36
+		#  The detail file reader acts just like a NAS.
37
+		#
38
+		#  This means that if accounting fails, the packet
39
+		#  is re-tried FOREVER.  It is YOUR responsibility
40
+		#  to write an accounting policy that returns "ok"
41
+		#  if the packet was processed properly, "fail" on
42
+		#  a database error, AND "ok" if you want to ignore
43
+		#  the packet (e.g. no Acct-Status-Type).
44
+		#
45
+		#  Neither the detail file write OR the detail file
46
+		#  reader look at the contents of the packets.  They
47
+		#  just either dump the packet verbatim to the file,
48
+		#  or read it verbatim from the file and pass it to
49
+		#  the server.
50
+		#
51
+		######################################################
52
+
53
+
54
+		#  The location where the detail file is located.
55
+		#  This should be on local disk, and NOT on an NFS
56
+		#  mounted location!
57
+		#
58
+		#  On most systems, this should support file globbing
59
+		#  e.g. "${radacctdir}/detail-*:*"
60
+		#  This lets you write many smaller detail files as in
61
+		#  the example in radiusd.conf: ".../detail-%Y%m%d:%H"
62
+		#  Writing many small files is often better than writing
63
+		#  one large file.  File globbing also means that with
64
+		#  a common naming scheme for detail files, then you can
65
+		#  have many detail file writers, and only one reader.
66
+		filename = ${radacctdir}/detail
67
+
68
+		#
69
+		#  The server can read accounting packets from the
70
+		#  detail file much more quickly than those packets
71
+		#  can be written to a database.  If the database is
72
+		#  overloaded, then bad things can happen.
73
+		#
74
+		#  The server will keep track of how long it takes to
75
+		#  process an entry from the detail file.  It will
76
+		#  then pause between handling entries.  This pause
77
+		#  allows databases to "catch up", and gives the
78
+		#  server time to notice that other packets may have
79
+		#  arrived.
80
+		#		
81
+		#  The pause is calculated dynamically, to ensure that
82
+		#  the load due to reading the detail files is limited
83
+		#  to a small percentage of CPU time.  The
84
+		#  "load_factor" configuration item is a number
85
+		#  between 1 and 100.  The server will try to keep the
86
+		#  percentage of time taken by "detail" file entries
87
+		#  to "load_factor" percentage of the CPU time.
88
+		#
89
+		#  If the "load_factor" is set to 100, then the server
90
+		#  will read packets as fast as it can, usually
91
+		#  causing databases to go into overload.
92
+		#  
93
+		load_factor = 10
94
+	}
95
+
96
+	#
97
+	#  Pre-accounting.  Decide which accounting type to use.
98
+	#
99
+	preacct {
100
+		preprocess
101
+	
102
+		# Since we're just proxying, we don't need acct_unique.
103
+
104
+		#
105
+		#  Look for IPASS-style 'realm/', and if not found, look for
106
+		#  '@realm', and decide whether or not to proxy, based on
107
+		#  that.
108
+		#
109
+		#  Accounting requests are generally proxied to the same
110
+		#  home server as authentication requests.
111
+	#	IPASS
112
+		suffix
113
+	#	ntdomain
114
+	
115
+		#
116
+		#  Read the 'acct_users' file.  This isn't always
117
+		#  necessary, and can be deleted if you do not use it.
118
+		files
119
+	}
120
+	
121
+	#
122
+	#  Accounting.  Log the accounting data.
123
+	#
124
+	accounting {
125
+		   #
126
+		   # Since we're proxying, we don't log anything
127
+		   # locally.  Ensure that the accounting section
128
+		   # "succeeds" by forcing an "ok" return.
129
+		   ok	
130
+	}
131
+	
132
+	
133
+	#
134
+	#  When the server decides to proxy a request to a home server,
135
+	#  the proxied request is first passed through the pre-proxy
136
+	#  stage.  This stage can re-write the request, or decide to
137
+	#  cancel the proxy.
138
+	#
139
+	#  Only a few modules currently have this method.
140
+	#
141
+	pre-proxy {
142
+	#	attr_rewrite
143
+	
144
+		#  If you want to have a log of packets proxied to a home
145
+		#  server, un-comment the following line, and the
146
+		#  'detail pre_proxy_log' section in radiusd.conf.
147
+	#	pre_proxy_log
148
+	}
149
+	
150
+	#
151
+	#  When the server receives a reply to a request it proxied
152
+	#  to a home server, the request may be massaged here, in the
153
+	#  post-proxy stage.
154
+	#
155
+	post-proxy {
156
+		#
157
+	
158
+		#  If you want to have a log of replies from a home
159
+		#  server, un-comment the following line, and the
160
+		#  'detail post_proxy_log' section in radiusd.conf.
161
+	#	post_proxy_log
162
+	
163
+	#	attr_rewrite
164
+	
165
+		#  Uncomment the following line if you want to filter
166
+		#  replies from remote proxies based on the rules
167
+		#  defined in the 'attrs' file.
168
+	
169
+	#	attr_filter
170
+	}
171
+}

+ 140
- 0
freeradius/config/tmp/freeradius/sites-available/decoupled-accounting View File

@@ -0,0 +1,140 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	This is a sample configuration for "decoupled" accounting.
5
+#	"Decoupled" accounting is where the accounting packets are
6
+#	NOT written "live" to the back-end database.  This method
7
+#	can only be used if you are not interested in "live"
8
+#	accounting.  i.e. Where you can tolerate delays that may be
9
+#	a few seconds, before accounting packets get written to
10
+#	the DB.
11
+#
12
+#	Oddly enough, this method can speed up the processing of
13
+#	accounting packets, as all database activity is serialized.
14
+#
15
+#	This file is NOT meant to be used as-is.  It needs to be
16
+#	edited to match your local configuration.
17
+#
18
+#	$Id: 199258dd7f3b3a5f3ce23d0a82798b256c85af66 $
19
+#
20
+######################################################################
21
+
22
+#  Define a virtual server to write the accounting packets.
23
+#  Any "listen" section that listens on an accounting port should
24
+#  set "virtual_server = write-detail.example.com
25
+server write_detail.example.com {
26
+	accounting {
27
+		#
28
+		#  Write the "detail" files.
29
+		#
30
+		#  See raddb/modules/detail.example.com for more info.
31
+		detail.example.com
32
+	}
33
+
34
+	# That's it!
35
+}
36
+
37
+#  Define a virtual server to process the accounting packets.
38
+server read-detail.example.com {
39
+	#  Read accounting packets from the detail file(s) for
40
+	#  the home server.
41
+	listen {
42
+		type = detail
43
+		filename = "${radacctdir}/detail.example.com/detail-*:*"
44
+		load_factor = 10
45
+	}
46
+
47
+	#  All packets read from the detail file are processed through
48
+	#  the preacct && accounting sections.
49
+	#
50
+	#  The following text is copied verbatim from sites-available/default.
51
+	#  You should edit it for your own local configuration.
52
+
53
+#
54
+#  Pre-accounting.  Decide which accounting type to use.
55
+#
56
+preacct {
57
+	preprocess
58
+
59
+	#
60
+	#  Ensure that we have a semi-unique identifier for every
61
+	#  request, and many NAS boxes are broken.
62
+	acct_unique
63
+
64
+	#
65
+	#  Look for IPASS-style 'realm/', and if not found, look for
66
+	#  '@realm', and decide whether or not to proxy, based on
67
+	#  that.
68
+	#
69
+	#  Accounting requests are generally proxied to the same
70
+	#  home server as authentication requests.
71
+#	IPASS
72
+	suffix
73
+#	ntdomain
74
+
75
+	#
76
+	#  Read the 'acct_users' file
77
+	files
78
+}
79
+
80
+#
81
+#  Accounting.  Log the accounting data.
82
+#
83
+accounting {
84
+	#
85
+	#  Create a 'detail'ed log of the packets.
86
+	#  Note that accounting requests which are proxied
87
+	#  are also logged in the detail file.
88
+	detail
89
+#	daily
90
+
91
+	#  Update the wtmp file
92
+	#
93
+	#  If you don't use "radlast", you can delete this line.
94
+	unix
95
+
96
+	#
97
+	#  For Simultaneous-Use tracking.
98
+	#
99
+	#  Due to packet losses in the network, the data here
100
+	#  may be incorrect.  There is little we can do about it.
101
+	radutmp
102
+#	sradutmp
103
+
104
+	#  Return an address to the IP Pool when we see a stop record.
105
+#	main_pool
106
+
107
+	#
108
+	#  Log traffic to an SQL database.
109
+	#
110
+	#  NOTE! You will have to ensure that any accounting packets
111
+	#  NOT handled by the SQL module (e.g. "stop with zero session length"
112
+	#  result in the accounting section still returning "ok".
113
+	#
114
+	#  Otherwise, the server will think that the accounting packet
115
+	#  was NOT handled properly, and will keep trying to process it
116
+	#  through this virtual server!
117
+	#
118
+	#  See "Accounting queries" in sql.conf
119
+#	sql
120
+
121
+	#
122
+	#  Instead of sending the query to the SQL server,
123
+	#  write it into a log file.
124
+	#
125
+#	sql_log
126
+
127
+	#  Cisco VoIP specific bulk accounting
128
+#	pgsql-voip
129
+
130
+	#  Filter attributes from the accounting response.
131
+	attr_filter.accounting_response
132
+
133
+	#
134
+	#  See "Autz-Type Status-Server" for how this works.
135
+	#
136
+#	Acct-Type Status-Server {
137
+#
138
+#	}
139
+}
140
+}

+ 660
- 0
freeradius/config/tmp/freeradius/sites-available/default View File

@@ -0,0 +1,660 @@
1
+######################################################################
2
+#
3
+#	As of 2.0.0, FreeRADIUS supports virtual hosts using the
4
+#	"server" section, and configuration directives.
5
+#
6
+#	Virtual hosts should be put into the "sites-available"
7
+#	directory.  Soft links should be created in the "sites-enabled"
8
+#	directory to these files.  This is done in a normal installation.
9
+#
10
+#	If you are using 802.1X (EAP) authentication, please see also
11
+#	the "inner-tunnel" virtual server.  You wll likely have to edit
12
+#	that, too, for authentication to work.
13
+#
14
+#	$Id: 520ccbc90f3a09cd6a80e1e3b16000b7ba94d884 $
15
+#
16
+######################################################################
17
+#
18
+#	Read "man radiusd" before editing this file.  See the section
19
+#	titled DEBUGGING.  It outlines a method where you can quickly
20
+#	obtain the configuration you want, without running into
21
+#	trouble.  See also "man unlang", which documents the format
22
+#	of this file.
23
+#
24
+#	This configuration is designed to work in the widest possible
25
+#	set of circumstances, with the widest possible number of
26
+#	authentication methods.  This means that in general, you should
27
+#	need to make very few changes to this file.
28
+#
29
+#	The best way to configure the server for your local system
30
+#	is to CAREFULLY edit this file.  Most attempts to make large
31
+#	edits to this file will BREAK THE SERVER.  Any edits should
32
+#	be small, and tested by running the server with "radiusd -X".
33
+#	Once the edits have been verified to work, save a copy of these
34
+#	configuration files somewhere.  (e.g. as a "tar" file).  Then,
35
+#	make more edits, and test, as above.
36
+#
37
+#	There are many "commented out" references to modules such
38
+#	as ldap, sql, etc.  These references serve as place-holders.
39
+#	If you need the functionality of that module, then configure
40
+#	it in radiusd.conf, and un-comment the references to it in
41
+#	this file.  In most cases, those small changes will result
42
+#	in the server being able to connect to the DB, and to
43
+#	authenticate users.
44
+#
45
+######################################################################
46
+
47
+#
48
+#	In 1.x, the "authorize", etc. sections were global in
49
+#	radiusd.conf.  As of 2.0, they SHOULD be in a server section.
50
+#
51
+#	The server section with no virtual server name is the "default"
52
+#	section.  It is used when no server name is specified.
53
+#
54
+#	We don't indent the rest of this file, because doing so
55
+#	would make it harder to read.
56
+#
57
+
58
+#  Authorization. First preprocess (hints and huntgroups files),
59
+#  then realms, and finally look in the "users" file.
60
+#
61
+#  Any changes made here should also be made to the "inner-tunnel"
62
+#  virtual server.
63
+#
64
+#  The order of the realm modules will determine the order that
65
+#  we try to find a matching realm.
66
+#
67
+#  Make *sure* that 'preprocess' comes before any realm if you 
68
+#  need to setup hints for the remote radius server
69
+authorize {
70
+	#
71
+	#  Security settings.  Take a User-Name, and do some simple
72
+	#  checks on it, for spaces and other invalid characters.  If
73
+	#  it looks like the user is trying to play games, reject it.
74
+	#
75
+	#  This should probably be enabled by default.
76
+	#
77
+	#  See policy.conf for the definition of the filter_username policy.
78
+	#
79
+#	filter_username
80
+
81
+	#
82
+	#  The preprocess module takes care of sanitizing some bizarre
83
+	#  attributes in the request, and turning them into attributes
84
+	#  which are more standard.
85
+	#
86
+	#  It takes care of processing the 'raddb/hints' and the
87
+	#  'raddb/huntgroups' files.
88
+	preprocess
89
+
90
+	#
91
+	#  If you want to have a log of authentication requests,
92
+	#  un-comment the following line, and the 'detail auth_log'
93
+	#  section, above.
94
+#	auth_log
95
+
96
+	#
97
+	#  The chap module will set 'Auth-Type := CHAP' if we are
98
+	#  handling a CHAP request and Auth-Type has not already been set
99
+	chap
100
+
101
+	#
102
+	#  If the users are logging in with an MS-CHAP-Challenge
103
+	#  attribute for authentication, the mschap module will find
104
+	#  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
105
+	#  to the request, which will cause the server to then use
106
+	#  the mschap module for authentication.
107
+	mschap
108
+
109
+	#
110
+	#  If you have a Cisco SIP server authenticating against
111
+	#  FreeRADIUS, uncomment the following line, and the 'digest'
112
+	#  line in the 'authenticate' section.
113
+	digest
114
+
115
+	#
116
+	#  The WiMAX specification says that the Calling-Station-Id
117
+	#  is 6 octets of the MAC.  This definition conflicts with
118
+	#  RFC 3580, and all common RADIUS practices.  Un-commenting
119
+	#  the "wimax" module here means that it will fix the
120
+	#  Calling-Station-Id attribute to the normal format as
121
+	#  specified in RFC 3580 Section 3.21
122
+#	wimax
123
+
124
+	#
125
+	#  Look for IPASS style 'realm/', and if not found, look for
126
+	#  '@realm', and decide whether or not to proxy, based on
127
+	#  that.
128
+#	IPASS
129
+
130
+	#
131
+	#  If you are using multiple kinds of realms, you probably
132
+	#  want to set "ignore_null = yes" for all of them.
133
+	#  Otherwise, when the first style of realm doesn't match,
134
+	#  the other styles won't be checked.
135
+	#
136
+	suffix
137
+#	ntdomain
138
+
139
+	#
140
+	#  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
141
+	#  authentication.
142
+	#
143
+	#  It also sets the EAP-Type attribute in the request
144
+	#  attribute list to the EAP type from the packet.
145
+	#
146
+	#  As of 2.0, the EAP module returns "ok" in the authorize stage
147
+	#  for TTLS and PEAP.  In 1.x, it never returned "ok" here, so
148
+	#  this change is compatible with older configurations.
149
+	#
150
+	#  The example below uses module failover to avoid querying all
151
+	#  of the following modules if the EAP module returns "ok".
152
+	#  Therefore, your LDAP and/or SQL servers will not be queried
153
+	#  for the many packets that go back and forth to set up TTLS
154
+	#  or PEAP.  The load on those servers will therefore be reduced.
155
+	#
156
+	eap {
157
+		ok = return
158
+	}
159
+
160
+	#
161
+	#  Pull crypt'd passwords from /etc/passwd or /etc/shadow,
162
+	#  using the system API's to get the password.  If you want
163
+	#  to read /etc/passwd or /etc/shadow directly, see the
164
+	#  passwd module in radiusd.conf.
165
+	#
166
+#	unix
167
+
168
+	#
169
+	#  Read the 'users' file
170
+	files
171
+
172
+	#
173
+	#  Look in an SQL database.  The schema of the database
174
+	#  is meant to mirror the "users" file.
175
+	#
176
+	#  See "Authorization Queries" in sql.conf
177
+#	sql
178
+
179
+	#
180
+	#  If you are using /etc/smbpasswd, and are also doing
181
+	#  mschap authentication, the un-comment this line, and
182
+	#  configure the 'smbpasswd' module.
183
+#	smbpasswd
184
+
185
+	#
186
+	#  The ldap module will set Auth-Type to LDAP if it has not
187
+	#  already been set
188
+#	ldap
189
+
190
+	#
191
+	#  Enforce daily limits on time spent logged in.
192
+#	daily
193
+
194
+	#
195
+	# Use the checkval module
196
+#	checkval
197
+
198
+	expiration
199
+	logintime
200
+
201
+	#
202
+	#  If no other module has claimed responsibility for
203
+	#  authentication, then try to use PAP.  This allows the
204
+	#  other modules listed above to add a "known good" password
205
+	#  to the request, and to do nothing else.  The PAP module
206
+	#  will then see that password, and use it to do PAP
207
+	#  authentication.
208
+	#
209
+	#  This module should be listed last, so that the other modules
210
+	#  get a chance to set Auth-Type for themselves.
211
+	#
212
+	pap
213
+
214
+	#
215
+	#  If "status_server = yes", then Status-Server messages are passed
216
+	#  through the following section, and ONLY the following section.
217
+	#  This permits you to do DB queries, for example.  If the modules
218
+	#  listed here return "fail", then NO response is sent.
219
+	#
220
+#	Autz-Type Status-Server {
221
+#
222
+#	}
223
+}
224
+
225
+
226
+#  Authentication.
227
+#
228
+#
229
+#  This section lists which modules are available for authentication.
230
+#  Note that it does NOT mean 'try each module in order'.  It means
231
+#  that a module from the 'authorize' section adds a configuration
232
+#  attribute 'Auth-Type := FOO'.  That authentication type is then
233
+#  used to pick the apropriate module from the list below.
234
+#
235
+
236
+#  In general, you SHOULD NOT set the Auth-Type attribute.  The server
237
+#  will figure it out on its own, and will do the right thing.  The
238
+#  most common side effect of erroneously setting the Auth-Type
239
+#  attribute is that one authentication method will work, but the
240
+#  others will not.
241
+#
242
+#  The common reasons to set the Auth-Type attribute by hand
243
+#  is to either forcibly reject the user (Auth-Type := Reject),
244
+#  or to or forcibly accept the user (Auth-Type := Accept).
245
+#
246
+#  Note that Auth-Type := Accept will NOT work with EAP.
247
+#
248
+#  Please do not put "unlang" configurations into the "authenticate"
249
+#  section.  Put them in the "post-auth" section instead.  That's what
250
+#  the post-auth section is for.
251
+#
252
+authenticate {
253
+	#
254
+	#  PAP authentication, when a back-end database listed
255
+	#  in the 'authorize' section supplies a password.  The
256
+	#  password can be clear-text, or encrypted.
257
+	Auth-Type PAP {
258
+		pap
259
+	}
260
+
261
+	#
262
+	#  Most people want CHAP authentication
263
+	#  A back-end database listed in the 'authorize' section
264
+	#  MUST supply a CLEAR TEXT password.  Encrypted passwords
265
+	#  won't work.
266
+	Auth-Type CHAP {
267
+		chap
268
+	}
269
+
270
+	#
271
+	#  MSCHAP authentication.
272
+	Auth-Type MS-CHAP {
273
+		mschap
274
+	}
275
+
276
+	#
277
+	#  If you have a Cisco SIP server authenticating against
278
+	#  FreeRADIUS, uncomment the following line, and the 'digest'
279
+	#  line in the 'authorize' section.
280
+	digest
281
+
282
+	#
283
+	#  Pluggable Authentication Modules.
284
+#	pam
285
+
286
+	#
287
+	#  See 'man getpwent' for information on how the 'unix'
288
+	#  module checks the users password.  Note that packets
289
+	#  containing CHAP-Password attributes CANNOT be authenticated
290
+	#  against /etc/passwd!  See the FAQ for details.
291
+	#
292
+	#  For normal "crypt" authentication, the "pap" module should
293
+	#  be used instead of the "unix" module.  The "unix" module should
294
+	#  be used for authentication ONLY for compatibility with legacy
295
+	#  FreeRADIUS configurations.
296
+	#
297
+	unix
298
+
299
+	# Uncomment it if you want to use ldap for authentication
300
+	#
301
+	# Note that this means "check plain-text password against
302
+	# the ldap database", which means that EAP won't work,
303
+	# as it does not supply a plain-text password.
304
+#	Auth-Type LDAP {
305
+#		ldap
306
+#	}
307
+
308
+	#
309
+	#  Allow EAP authentication.
310
+	eap
311
+
312
+	#
313
+	#  The older configurations sent a number of attributes in
314
+	#  Access-Challenge packets, which wasn't strictly correct.
315
+	#  If you want to filter out these attributes, uncomment
316
+	#  the following lines.
317
+	#
318
+#	Auth-Type eap {
319
+#		eap {
320
+#			handled = 1  
321
+#		}
322
+#		if (handled && (Response-Packet-Type == Access-Challenge)) {
323
+#			attr_filter.access_challenge.post-auth
324
+#			handled  # override the "updated" code from attr_filter
325
+#		}
326
+#	}
327
+}
328
+
329
+
330
+#
331
+#  Pre-accounting.  Decide which accounting type to use.
332
+#
333
+preacct {
334
+	preprocess
335
+
336
+	#
337
+	#  Session start times are *implied* in RADIUS.
338
+	#  The NAS never sends a "start time".  Instead, it sends
339
+	#  a start packet, *possibly* with an Acct-Delay-Time.
340
+	#  The server is supposed to conclude that the start time
341
+	#  was "Acct-Delay-Time" seconds in the past.
342
+	#
343
+	#  The code below creates an explicit start time, which can
344
+	#  then be used in other modules.
345
+	#
346
+	#  The start time is: NOW - delay - session_length
347
+	#
348
+
349
+#	  update request {
350
+#	  	FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
351
+#	}
352
+
353
+
354
+	#
355
+	#  Ensure that we have a semi-unique identifier for every
356
+	#  request, and many NAS boxes are broken.
357
+	acct_unique
358
+
359
+	#
360
+	#  Look for IPASS-style 'realm/', and if not found, look for
361
+	#  '@realm', and decide whether or not to proxy, based on
362
+	#  that.
363
+	#
364
+	#  Accounting requests are generally proxied to the same
365
+	#  home server as authentication requests.
366
+#	IPASS
367
+	suffix
368
+#	ntdomain
369
+
370
+	#
371
+	#  Read the 'acct_users' file
372
+	files
373
+}
374
+
375
+#
376
+#  Accounting.  Log the accounting data.
377
+#
378
+accounting {
379
+	#
380
+	#  Create a 'detail'ed log of the packets.
381
+	#  Note that accounting requests which are proxied
382
+	#  are also logged in the detail file.
383
+	detail
384
+#	daily
385
+
386
+	#  Update the wtmp file
387
+	#
388
+	#  If you don't use "radlast", you can delete this line.
389
+#	unix
390
+
391
+	#
392
+	#  For Simultaneous-Use tracking.
393
+	#
394
+	#  Due to packet losses in the network, the data here
395
+	#  may be incorrect.  There is little we can do about it.
396
+#	radutmp
397
+#	sradutmp
398
+
399
+	#  Return an address to the IP Pool when we see a stop record.
400
+#	main_pool
401
+
402
+	#
403
+	#  Log traffic to an SQL database.
404
+	#
405
+	#  See "Accounting queries" in sql.conf
406
+#	sql
407
+
408
+	#
409
+	#  If you receive stop packets with zero session length,
410
+	#  they will NOT be logged in the database.  The SQL module
411
+	#  will print a message (only in debugging mode), and will
412
+	#  return "noop".
413
+	#
414
+	#  You can ignore these packets by uncommenting the following
415
+	#  three lines.  Otherwise, the server will not respond to the
416
+	#  accounting request, and the NAS will retransmit.
417
+	#
418
+#	if (noop) {
419
+#		ok
420
+#	}
421
+
422
+	#
423
+	#  Instead of sending the query to the SQL server,
424
+	#  write it into a log file.
425
+	#
426
+#	sql_log
427
+
428
+	#  Cisco VoIP specific bulk accounting
429
+#	pgsql-voip
430
+
431
+	# For Exec-Program and Exec-Program-Wait
432
+	exec
433
+
434
+	#  Filter attributes from the accounting response.
435
+	attr_filter.accounting_response
436
+
437
+	#
438
+	#  See "Autz-Type Status-Server" for how this works.
439
+	#
440
+#	Acct-Type Status-Server {
441
+#
442
+#	}
443
+}
444
+
445
+
446
+#  Session database, used for checking Simultaneous-Use. Either the radutmp 
447
+#  or rlm_sql module can handle this.
448
+#  The rlm_sql module is *much* faster
449
+session {
450
+	radutmp
451
+
452
+	#
453
+	#  See "Simultaneous Use Checking Queries" in sql.conf
454
+#	sql
455
+}
456
+
457
+
458
+#  Post-Authentication
459
+#  Once we KNOW that the user has been authenticated, there are
460
+#  additional steps we can take.
461
+post-auth {
462
+	#  Get an address from the IP Pool.
463
+#	main_pool
464
+
465
+	#
466
+	#  If you want to have a log of authentication replies,
467
+	#  un-comment the following line, and the 'detail reply_log'
468
+	#  section, above.
469
+#	reply_log
470
+
471
+	#
472
+	#  After authenticating the user, do another SQL query.
473
+	#
474
+	#  See "Authentication Logging Queries" in sql.conf
475
+#	sql
476
+
477
+	#
478
+	#  Instead of sending the query to the SQL server,
479
+	#  write it into a log file.
480
+	#
481
+#	sql_log
482
+
483
+	#
484
+	#  Un-comment the following if you have set
485
+	#  'edir_account_policy_check = yes' in the ldap module sub-section of
486
+	#  the 'modules' section.
487
+	#
488
+#	ldap
489
+
490
+	# For Exec-Program and Exec-Program-Wait
491
+	exec
492
+
493
+	#
494
+	#  Calculate the various WiMAX keys.  In order for this to work,
495
+	#  you will need to define the WiMAX NAI, usually via
496
+	#
497
+	#	update request {
498
+	#	       WiMAX-MN-NAI = "%{User-Name}"
499
+	#	}
500
+	#
501
+	#  If you want various keys to be calculated, you will need to
502
+	#  update the reply with "template" values.  The module will see
503
+	#  this, and replace the template values with the correct ones
504
+	#  taken from the cryptographic calculations.  e.g.
505
+	#
506
+	# 	update reply {
507
+	#		WiMAX-FA-RK-Key = 0x00
508
+	#		WiMAX-MSK = "%{EAP-MSK}"
509
+	#	}
510
+	#
511
+	#  You may want to delete the MS-MPPE-*-Keys from the reply,
512
+	#  as some WiMAX clients behave badly when those attributes
513
+	#  are included.  See "raddb/modules/wimax", configuration
514
+	#  entry "delete_mppe_keys" for more information.
515
+	#
516
+#	wimax
517
+
518
+	#  If there is a client certificate (EAP-TLS, sometimes PEAP
519
+	#  and TTLS), then some attributes are filled out after the
520
+	#  certificate verification has been performed.  These fields
521
+	#  MAY be available during the authentication, or they may be
522
+	#  available only in the "post-auth" section.
523
+	#
524
+	#  The first set of attributes contains information about the
525
+	#  issuing certificate which is being used.  The second
526
+	#  contains information about the client certificate (if
527
+	#  available).
528
+#
529
+#	update reply {
530
+#	       Reply-Message += "%{TLS-Cert-Serial}"
531
+#	       Reply-Message += "%{TLS-Cert-Expiration}"
532
+#	       Reply-Message += "%{TLS-Cert-Subject}"
533
+#	       Reply-Message += "%{TLS-Cert-Issuer}"
534
+#	       Reply-Message += "%{TLS-Cert-Common-Name}"
535
+#	       Reply-Message += "%{TLS-Cert-Subject-Alt-Name-Email}"
536
+#
537
+#	       Reply-Message += "%{TLS-Client-Cert-Serial}"
538
+#	       Reply-Message += "%{TLS-Client-Cert-Expiration}"
539
+#	       Reply-Message += "%{TLS-Client-Cert-Subject}"
540
+#	       Reply-Message += "%{TLS-Client-Cert-Issuer}"
541
+#	       Reply-Message += "%{TLS-Client-Cert-Common-Name}"
542
+#	       Reply-Message += "%{TLS-Client-Cert-Subject-Alt-Name-Email}"
543
+#	}
544
+
545
+	#  MacSEC requires the use of EAP-Key-Name.  However, we don't
546
+	#  want to send it for all EAP sessions.  Therefore, the EAP
547
+	#  modules put required data into the EAP-Session-Id attribute.
548
+	#  This attribute is never put into a request or reply packet.
549
+	#
550
+	#  Uncomment the next few lines to copy the required data into
551
+	#  the EAP-Key-Name attribute
552
+#	if (reply:EAP-Session-Id) {
553
+#		update reply {
554
+#			EAP-Key-Name := "%{reply:EAP-Session-Id}"
555
+#		}
556
+#	}
557
+
558
+	#  If the WiMAX module did it's work, you may want to do more
559
+	#  things here, like delete the MS-MPPE-*-Key attributes.
560
+	#
561
+	#	if (updated) {
562
+	#		update reply {
563
+	#			MS-MPPE-Recv-Key !* 0x00
564
+	#			MS-MPPE-Send-Key !* 0x00
565
+	#		}
566
+	#	}
567
+
568
+	#
569
+	#  Access-Reject packets are sent through the REJECT sub-section of the
570
+	#  post-auth section.
571
+	#
572
+	#  Add the ldap module name (or instance) if you have set 
573
+	#  'edir_account_policy_check = yes' in the ldap module configuration
574
+	#
575
+	Post-Auth-Type REJECT {
576
+		# log failed authentications in SQL, too.
577
+#		sql
578
+		attr_filter.access_reject
579
+	}
580
+}
581
+
582
+#
583
+#  When the server decides to proxy a request to a home server,
584
+#  the proxied request is first passed through the pre-proxy
585
+#  stage.  This stage can re-write the request, or decide to
586
+#  cancel the proxy.
587
+#
588
+#  Only a few modules currently have this method.
589
+#
590
+pre-proxy {
591
+#	attr_rewrite
592
+
593
+	#  Uncomment the following line if you want to change attributes
594
+	#  as defined in the preproxy_users file.
595
+#	files
596
+
597
+	#  Uncomment the following line if you want to filter requests
598
+	#  sent to remote servers based on the rules defined in the
599
+	#  'attrs.pre-proxy' file.
600
+#	attr_filter.pre-proxy
601
+
602
+	#  If you want to have a log of packets proxied to a home
603
+	#  server, un-comment the following line, and the
604
+	#  'detail pre_proxy_log' section, above.
605
+#	pre_proxy_log
606
+}
607
+
608
+#
609
+#  When the server receives a reply to a request it proxied
610
+#  to a home server, the request may be massaged here, in the
611
+#  post-proxy stage.
612
+#
613
+post-proxy {
614
+
615
+	#  If you want to have a log of replies from a home server,
616
+	#  un-comment the following line, and the 'detail post_proxy_log'
617
+	#  section, above.
618
+#	post_proxy_log
619
+
620
+#	attr_rewrite
621
+
622
+	#  Uncomment the following line if you want to filter replies from
623
+	#  remote proxies based on the rules defined in the 'attrs' file.
624
+#	attr_filter.post-proxy
625
+
626
+	#
627
+	#  If you are proxying LEAP, you MUST configure the EAP
628
+	#  module, and you MUST list it here, in the post-proxy
629
+	#  stage.
630
+	#
631
+	#  You MUST also use the 'nostrip' option in the 'realm'
632
+	#  configuration.  Otherwise, the User-Name attribute
633
+	#  in the proxied request will not match the user name
634
+	#  hidden inside of the EAP packet, and the end server will
635
+	#  reject the EAP request.
636
+	#
637
+	eap
638
+
639
+	#
640
+	#  If the server tries to proxy a request and fails, then the
641
+	#  request is processed through the modules in this section.
642
+	#
643
+	#  The main use of this section is to permit robust proxying
644
+	#  of accounting packets.  The server can be configured to
645
+	#  proxy accounting packets as part of normal processing.
646
+	#  Then, if the home server goes down, accounting packets can
647
+	#  be logged to a local "detail" file, for processing with
648
+	#  radrelay.  When the home server comes back up, radrelay
649
+	#  will read the detail file, and send the packets to the
650
+	#  home server.
651
+	#
652
+	#  With this configuration, the server always responds to
653
+	#  Accounting-Requests from the NAS, but only writes
654
+	#  accounting packets to disk if the home server is down.
655
+	#
656
+#	Post-Proxy-Type Fail {
657
+#			detail
658
+#	}
659
+}
660
+

+ 283
- 0
freeradius/config/tmp/freeradius/sites-available/dhcp View File

@@ -0,0 +1,283 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	This is a virtual server that handles DHCP.
5
+#
6
+#		!!!! WARNING !!!!
7
+#
8
+#	This code is experimental, and SHOULD NOT be used in a
9
+#	production system.  It is intended for validation and
10
+#	experimentation ONLY.
11
+#
12
+#	In order for this to work, you will need to run configure:
13
+#
14
+#		$ ./configure --with-dhcp
15
+#		$ make
16
+#		$ vi share/dictionary
17
+#
18
+#	## Un-comment the line containing $INCLUDE dictionary.dhcp
19
+#	## Then, save the file.
20
+#
21
+#		$ make install
22
+#
23
+#	DHCP is NOT enabled by default.
24
+#
25
+#	The goal of this effort is to get the code in front of
26
+#	people who are interested in another DHCP server.
27
+#	We NEED FEEDBACK, patches, bug reports, etc.  Especially patches!
28
+#
29
+#	Please contribute, or this work will be nothing more than
30
+#	a curiosity.
31
+#
32
+#
33
+#	Q: What does it do?
34
+#	A: It allows the server to receive DHCP packets, and to
35
+#	   respond with static, pre-configured DHCP responses.
36
+#
37
+#	Q: Does it do static/dynamic IP assignment?
38
+#	A: No.  Or, maybe.  Try it and see.
39
+#
40
+#	Q: Does it read ISC configuration or lease files?
41
+#	A: No.  Please submit patches.
42
+#
43
+#	Q: Does it have DHCP feature X?
44
+#	A: No.  Please submit patches.
45
+#
46
+#	Q: Does it support option 82?
47
+#	A: Yes.
48
+#
49
+#	Q: Does it support other options?
50
+#	A: Maybe.  See dictionary.dhcp.  Please submit patches.
51
+#
52
+#	Q: It doesn't seem to do much of anything!
53
+#	A: Exactly.
54
+#
55
+#	$Id: 33da1f10a67dd38b889300bc998737a268ef0948 $
56
+#
57
+######################################################################
58
+
59
+#
60
+#  The DHCP functionality goes into a virtual server.
61
+#
62
+server dhcp {
63
+
64
+#  Define a DHCP socket.
65
+#
66
+#  The default port below is 6700, so you don't break your network.
67
+#  If you want it to do real DHCP, change this to 67, and good luck!
68
+#
69
+#  You can also bind the DHCP socket to an interface.
70
+#  See below, and raddb/radiusd.conf for examples.
71
+#
72
+#  This lets you run *one* DHCP server instance and have it listen on
73
+#  multiple interfaces, each with a separate policy.
74
+#
75
+#  If you have multiple interfaces, it is a good idea to bind the
76
+#  listen section to an interface.  You will also need one listen
77
+#  section per interface.
78
+#
79
+#  FreeBSD does *not* support binding sockets to interfaces.  Therefore,
80
+#  if you have multiple interfaces, broadcasts may go out of the wrong
81
+#  one, or even all interfaces.  The solution is to use the "setfib" command.
82
+#  If you have a network "10.10.0/24" on LAN1, you will need to do:
83
+#
84
+#  Pick any IP on the 10.10.0/24 network
85
+#	$ setfib 1 route add default 10.10.0.1
86
+#
87
+#  Edit /etc/rc.local, and add a line:
88
+#	setfib 1 /path/to/radiusd
89
+#
90
+#  The kern must be built with the following options:
91
+#	options    ROUTETABLES=2
92
+#  or any value larger than 2.
93
+#
94
+# The other only solution is to update FreeRADIUS to use BPF sockets.
95
+#
96
+
97
+	#  So that we only specify these values once, and then
98
+	#  use them in all of the listen sections.
99
+	port = 6700
100
+	ipaddr = 127.0.0.1
101
+	interface = lo0
102
+
103
+	#  When the machine is not Linux, or has only one network
104
+	#  interface, use the following listener.  It receives
105
+	#  broadcast *and* unicast packets.
106
+	listen {
107
+		type = dhcp
108
+
109
+		ipaddr = *
110
+		port = ${..port}
111
+		interface = ${..interface}
112
+
113
+		# The DHCP server defaults to allowing broadcast packets.
114
+		# Set this to "no" only when the server receives *all* packets
115
+		# from a relay agent.  i.e. when *no* clients are on the same
116
+		# LAN as the DHCP server.
117
+		#
118
+		# It's set to "no" here for testing.
119
+		broadcast = no
120
+	}
121
+
122
+	# When the machine is Linux and has multiple network interfaces, use
123
+	# the following two listeners instead of the one above.
124
+
125
+	#  Listen for broadcasts on a specific interface.
126
+	listen {
127
+		type = dhcp
128
+		ipaddr = 255.255.255.255
129
+		port = ${..port}
130
+		interface = ${..interface}
131
+
132
+		#
133
+		#  The source IP for unicast packets is chosen from the first
134
+		#  one of the following items which returns a valid IP
135
+		#  address:
136
+		#
137
+		#	src_ipaddr
138
+		#	ipaddr
139
+		#	reply:DHCP-Server-IP-Address
140
+		#	reply:DHCP-DHCP-Server-Identifier
141
+		#
142
+		#  For now, use the parent's "ipaddr", not the one
143
+		#  in this listen section
144
+		#
145
+                src_ipaddr = ${..ipaddr}
146
+	}
147
+
148
+	#  Listen for unicasts on an IP, but not bound to any interface.
149
+	#  This allows Linux systems to receive packets on interface X
150
+	#  when the IP is associated with interface Y.
151
+	#
152
+	#  Then, define which interface the packets go out of, via
153
+	#  "src_interface".  This means that the outbound packets
154
+	#  get sent via the correct interface.
155
+	listen {
156
+		type = dhcp
157
+		ipaddr = ${..ipaddr}
158
+		port = ${..port}
159
+
160
+		#
161
+		#  When sending unicast responses, this interface is
162
+		#  used as the source interface.  If unset, the value
163
+		#  is taken from the "interface" field in this
164
+		#  section.
165
+		#
166
+		#  This interface is also used when adding ARP entries.
167
+		#  FreeRADIUS doesn't open "raw" network sockets to send
168
+		#  unicast DHCP responses on the local network.  Instead,
169
+		#  it updates the ARP table for this interface with the
170
+		#  MAX and IP of the DHCP client.  The server can then
171
+		#  send a normal UDP unicast socket.
172
+		#
173
+		#  NOTE: The server MUST be running as "root" in order
174
+		#  to update the ARP table.  Or, it must have the
175
+		#  apropriate capabilities added to it after it starts up.
176
+		#
177
+		src_interface = ${..interface}
178
+	}
179
+
180
+#  Packets received on the socket will be processed through one
181
+#  of the following sections, named after the DHCP packet type.
182
+#  See dictionary.dhcp for the packet types.
183
+dhcp DHCP-Discover {
184
+	update reply {
185
+	       DHCP-Message-Type = DHCP-Offer
186
+	}
187
+
188
+	#  The contents here are invented.  Change them!
189
+	update reply {
190
+	        DHCP-Domain-Name-Server = 127.0.0.1
191
+	        DHCP-Domain-Name-Server = 127.0.0.2
192
+		DHCP-Subnet-Mask = 255.255.255.0
193
+		DHCP-Router-Address = 192.168.1.1
194
+		DHCP-IP-Address-Lease-Time = 86400
195
+		DHCP-DHCP-Server-Identifier = 192.168.1.1
196
+	}
197
+
198
+	#  Do a simple mapping of MAC to assigned IP.
199
+	#
200
+	#  See below for the definition of the "mac2ip"
201
+	#  module.
202
+	#
203
+	#mac2ip
204
+
205
+	#  If the MAC wasn't found in that list, do something else.
206
+	#  You could call a Perl, Python, or Java script here.
207
+
208
+	#if (notfound) {
209
+	# ...
210
+	#}
211
+
212
+	#  Or, allocate IPs from the DHCP pool in SQL.
213
+#	dhcp_sqlippool
214
+
215
+	ok
216
+}
217
+
218
+dhcp DHCP-Request {
219
+	update reply {
220
+	       DHCP-Message-Type = DHCP-Ack
221
+	}
222
+
223
+	#  The contents here are invented.  Change them!
224
+	update reply {
225
+	        DHCP-Domain-Name-Server = 127.0.0.1
226
+	        DHCP-Domain-Name-Server = 127.0.0.2
227
+		DHCP-Subnet-Mask = 255.255.255.0
228
+		DHCP-Router-Address = 192.168.1.1
229
+		DHCP-IP-Address-Lease-Time = 86400
230
+		DHCP-DHCP-Server-Identifier = 192.168.1.1
231
+	}
232
+
233
+	#  Do a simple mapping of MAC to assigned IP.
234
+	#
235
+	#  See below for the definition of the "mac2ip"
236
+	#  module.
237
+	#
238
+	#mac2ip
239
+
240
+	#  If the MAC wasn't found in that list, do something else.
241
+	#  You could call a Perl, Python, or Java script here.
242
+
243
+	#if (notfound) {
244
+	# ...
245
+	#}
246
+
247
+	#  Or, allocate IPs from the DHCP pool in SQL.
248
+#	dhcp_sqlippool
249
+
250
+	ok
251
+}
252
+
253
+#  If there's no named section for the packet type, then the packet
254
+#  is processed through this section.
255
+dhcp {
256
+	# send a DHCP NAK.
257
+	reject
258
+}
259
+
260
+
261
+}
262
+
263
+######################################################################
264
+#
265
+#  This next section is a sample configuration for the "passwd"
266
+#  module, that reads flat-text files.  It should go into
267
+#  radiusd.conf, in the "modules" section.
268
+#
269
+#  The file is in the format <mac>,<ip>
270
+#
271
+#	00:01:02:03:04:05,192.168.1.100
272
+#	01:01:02:03:04:05,192.168.1.101
273
+#	02:01:02:03:04:05,192.168.1.102
274
+#
275
+#  This lets you perform simple static IP assignment.
276
+#
277
+######################################################################
278
+
279
+#passwd mac2ip {
280
+#	filename = ${confdir}/mac2ip
281
+#	format = "*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"
282
+#	delimiter = ","
283
+#}

+ 65
- 0
freeradius/config/tmp/freeradius/sites-available/dhcp.relay View File

@@ -0,0 +1,65 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	This is a virtual server that handles DHCP relaying
5
+#
6
+#	Only one server can listen on a socket, so you cannot
7
+#	do DHCP relaying && run a DHCP server at the same time.
8
+#
9
+######################################################################
10
+
11
+server dhcp.eth1 {
12
+	# When the machine is not Linux, or has only one network interface, use
13
+	# the following listener:
14
+	listen {
15
+		# Listen for broadcasts + unicast on eth1
16
+		ipaddr = *
17
+		port = 67
18
+		type = dhcp
19
+		interface = eth1
20
+	}
21
+	# When the machine is Linux and has multiple network interfaces, use
22
+	# the following listeners instead:
23
+	listen {
24
+		# Listen for broadcasts on eth1
25
+		ipaddr = 255.255.255.255
26
+		port = 67
27
+		type = dhcp
28
+		interface = eth1
29
+	}
30
+	listen {
31
+		# Listen for unicast on our IP address, not bound to any
32
+		# interface but telling on which interface to forward the
33
+		# packets to.
34
+		ipaddr = 192.0.100.2
35
+		port = 67
36
+		type = dhcp
37
+		arp_interface = eth1
38
+	}
39
+
40
+	#  Packets received on the socket will be processed through one
41
+	#  of the following sections, named after the DHCP packet type.
42
+	#  See dictionary.dhcp for the packet types.
43
+	dhcp DHCP-Discover {
44
+		update config {
45
+			# IP Address of the DHCP server
46
+			DHCP-Relay-To-IP-Address := 192.0.1.2
47
+		}
48
+		update request {
49
+			# IP Address of the DHCP relay (eth1)
50
+			DHCP-Gateway-IP-Address := 192.0.100.2
51
+		}
52
+		ok
53
+	}
54
+
55
+	dhcp DHCP-Request {
56
+		update config {
57
+			# IP Address of the DHCP server
58
+			DHCP-Relay-To-IP-Address := 192.0.1.2
59
+		}
60
+		update request {
61
+			DHCP-Gateway-IP-Address := 192.0.100.2
62
+		}
63
+		ok
64
+	}
65
+}

+ 224
- 0
freeradius/config/tmp/freeradius/sites-available/dynamic-clients View File

@@ -0,0 +1,224 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	Sample configuration file for dynamically updating the list
5
+#	of RADIUS clients at run time.
6
+#
7
+#	Everything is keyed off of a client "network".  (e.g. 192.168/16)
8
+#	This configuration lets the server know that clients within
9
+#	that network are defined dynamically.
10
+#
11
+#	When the server receives a packet from an unknown IP address
12
+#	within that network, it tries to find a dynamic definition
13
+#	for that client.  If the definition is found, the IP address
14
+#	(and other configuration) is added to the server's internal
15
+#	cache of "known clients", with a configurable lifetime.
16
+#
17
+#	Further packets from that IP address result in the client
18
+#	definition being found in the cache.  Once the lifetime is
19
+#	reached, the client definition is deleted, and any new requests
20
+#	from that client are looked up as above.
21
+#
22
+#	If the dynamic definition is not found, then the request is
23
+#	treated as if it came from an unknown client.  i.e. It is
24
+#	silently discarded.
25
+#
26
+#	As part of protection from Denial of Service (DoS) attacks,
27
+#	the server will add only one new client per second.  This CANNOT
28
+#	be changed, and is NOT configurable.
29
+#
30
+#	$Id: f8c3cc4ddd4a8e6434911fbcc444715f4ac95912 $
31
+#
32
+######################################################################
33
+
34
+#
35
+#  Define a network where clients may be dynamically defined.
36
+client dynamic {
37
+	ipaddr = 192.168.0.0
38
+
39
+	#
40
+	#  You MUST specify a netmask!
41
+	#  IPv4 /32 or IPv6 /128 are NOT allowed!
42
+	netmask = 16
43
+
44
+	#
45
+	#  Any other configuration normally found in a "client"
46
+	#  entry can be used here.
47
+
48
+	#
49
+	#  A shared secret does NOT have to be defined.  It can
50
+	#  be left out.
51
+
52
+	#
53
+	#  Define the virtual server used to discover dynamic clients.
54
+	dynamic_clients = dynamic_client_server
55
+
56
+	#
57
+	#  The directory where client definitions are stored.  This
58
+	#  needs to be used ONLY if the client definitions are stored
59
+	#  in flat-text files.  Each file in that directory should be
60
+	#  ONE and only one client definition.  The name of the file
61
+	#  should be the IP address of the client.
62
+	#
63
+	#  If you are storing clients in SQL, this entry should not
64
+	#  be used.
65
+#	directory = ${confdir}/dynamic-clients/
66
+
67
+	#
68
+	#  Define the lifetime (in seconds) for dynamic clients.
69
+	#  They will be cached for this lifetime, and deleted afterwards.
70
+	#
71
+	#  If the lifetime is "0", then the dynamic client is never
72
+	#  deleted.  The only way to delete the client is to re-start
73
+	#  the server.
74
+	lifetime = 3600
75
+}
76
+
77
+#
78
+#  This is the virtual server referenced above by "dynamic_clients".
79
+server dynamic_client_server {
80
+
81
+	#
82
+	#  The only contents of the virtual server is the "authorize" section.
83
+	authorize {
84
+
85
+		#
86
+		#  Put any modules you want here.  SQL, LDAP, "exec",
87
+		#  Perl, etc.  The only requirements is that the
88
+		#  attributes MUST go into the control item list.
89
+		#
90
+		#  The request that is processed through this section
91
+		#  is EMPTY.  There are NO attributes.  The request is fake,
92
+		#  and is NOT the packet that triggered the lookup of
93
+		#  the dynamic client.
94
+		#
95
+		#  The ONLY piece of useful information is either
96
+		#
97
+		#	Packet-Src-IP-Address (IPv4 clients)
98
+		#	Packet-Src-IPv6-Address (IPv6 clients)
99
+		#
100
+		#  The attributes used to define a dynamic client mirror
101
+		#  the configuration items in the "client" structure.
102
+		#
103
+
104
+		#
105
+		#  Example 1: Hard-code a client IP.  This example is
106
+		#             useless, but it documents the attributes
107
+		#             you need.
108
+		#
109
+		update control {
110
+
111
+			#
112
+			#  Echo the IP address of the client.
113
+			FreeRADIUS-Client-IP-Address = "%{Packet-Src-IP-Address}"
114
+
115
+			# require_message_authenticator
116
+			FreeRADIUS-Client-Require-MA = no
117
+
118
+			# secret
119
+			FreeRADIUS-Client-Secret = "testing123"
120
+
121
+			# shortname
122
+			FreeRADIUS-Client-Shortname = "%{Packet-Src-IP-Address}"
123
+
124
+			# nastype
125
+			FreeRADIUS-Client-NAS-Type = "other"
126
+
127
+			# virtual_server
128
+			#
129
+			#  This can ONLY be used if the network client
130
+			#  definition (e.g. "client dynamic" above) has
131
+			#  NO virtual_server defined.
132
+			#
133
+			#  If the network client definition does have a
134
+			#  virtual_server defined, then that is used,
135
+			#  and there is no need to define this attribute.
136
+			#  
137
+			FreeRADIUS-Client-Virtual-Server = "something"
138
+
139
+		}
140
+
141
+		#
142
+		#  Example 2: Read the clients from "clients" files
143
+		#             in a directory.
144
+		#
145
+
146
+		#             This requires you to uncomment the
147
+		#             "directory" configuration in the
148
+		#             "client dynamic" configuration above,
149
+		#	      and then put one file per IP address in
150
+		#             that directory.
151
+		#
152
+		dynamic_clients
153
+
154
+		#
155
+		#  Example 3: Look the clients up in SQL.
156
+		#
157
+		#  This requires the SQL module to be configured, of course.
158
+		if ("%{sql: SELECT nasname FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}") {
159
+			update control {
160
+				#
161
+				#  Echo the IP.
162
+				FreeRADIUS-Client-IP-Address = "%{Packet-Src-IP-Address}"
163
+
164
+				#
165
+				#  Do multiple SELECT statements to grab
166
+				#  the various definitions.
167
+				FreeRADIUS-Client-Shortname = "%{sql: SELECT shortname FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
168
+
169
+				FreeRADIUS-Client-Secret = "%{sql: SELECT secret FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
170
+
171
+				FreeRADIUS-Client-NAS-Type = "%{sql: SELECT type FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
172
+
173
+				FreeRADIUS-Client-Virtual-Server = "%{sql: SELECT server FROM nas WHERE nasname = '%{Packet-Src-IP-Address}'}"
174
+			}
175
+
176
+		}
177
+
178
+		# Do an LDAP lookup in the elements OU, check to see if
179
+		# the Packet-Src-IP-Address object has a "ou"
180
+		# attribute, if it does continue.  Change "ACME.COM" to
181
+		# the real OU of your organization.
182
+		#
183
+		# Assuming the following schema:
184
+		#
185
+		# OU=Elements,OU=Radius,DC=ACME,DC=COM
186
+		#
187
+		# Elements will hold a record of every NAS in your
188
+		# Network.  Create Group objects based on the IP
189
+		# Address of the NAS and set the "Location" or "l"
190
+		# attribute to the NAS Huntgroup the NAS belongs to
191
+		# allow them to be centrally managed in LDAP.
192
+		#
193
+		# e.g.  CN=10.1.2.3,OU=Elements,OU=Radius,DC=ACME,DC=COM
194
+		#
195
+		# With a "l" value of "CiscoRTR" for a Cisco Router
196
+		# that has a NAS-IP-Address or Source-IP-Address of
197
+		# 10.1.2.3.
198
+		#
199
+		# And with a "ou" value of the shared secret password
200
+		# for the NAS element. ie "password"
201
+		if ("%{ldap:ldap:///OU=Elements,OU=Radius,DC=ACME,DC=COM?ou?sub?cn=%{Packet-Src-IP-Address}}") {
202
+			update control {
203
+			       FreeRADIUS-Client-IP-Address = "%{Packet-Src-IP-Address}"
204
+
205
+				# Set the Client-Shortname to be the Location
206
+				# "l" just like in the Huntgroups, but this
207
+				# time to the shortname.
208
+
209
+				FreeRADIUS-Client-Shortname = "%{ldap:ldap:///OU=Elements,OU=Radius,DC=ACME,DC=COM?l?sub?cn=%{Packet-Src-IP-Address}}"
210
+
211
+				# Lookup and set the Shared Secret based on
212
+				# the "ou" attribute.
213
+				FreeRADIUS-Client-Secret = "%{ldap:ldap:///OU=Elements,OU=Radius,DC=ACME,DC=COM?ou?sub?cn=%{Packet-Src-IP-Address}}"
214
+			}
215
+		}
216
+
217
+		#
218
+		#  Tell the caller that the client was defined properly.
219
+		#
220
+		#  If the authorize section does NOT return "ok", then
221
+		#  the new client is ignored.
222
+		ok
223
+	}
224
+}

+ 122
- 0
freeradius/config/tmp/freeradius/sites-available/example View File

@@ -0,0 +1,122 @@
1
+######################################################################
2
+#
3
+#	An example virtual server configuration.
4
+#
5
+#	$Id: 89950303b94d5763ebd96744500b7a00da186c08 $
6
+#
7
+######################################################################
8
+
9
+
10
+#
11
+#	This client will be available to any "listen" section that
12
+#	are defined outside of a virtual server section.  However,
13
+#	when the server receives a packet from this client, the
14
+#	request will be processed through the "example" virtual
15
+#	server, as the "client" section contains a configuration item
16
+#	to that effect.
17
+#
18
+#	Note that this client will be able to send requests to any
19
+#	port defined in a global "listen" section.  It will NOT,
20
+#	however, be able to send requests to a port defined in a
21
+#	"listen" section that is contained in a "server" section.
22
+#
23
+#	With careful matching of configurations, you should be able
24
+#	to:
25
+#
26
+#	- Define one authentication port, but process each client
27
+#	  through a separate virtual server.
28
+#
29
+#	- define multiple authentication ports, each with a private
30
+#	  list of clients.
31
+#
32
+#	- define multiple authentication ports, each of which may
33
+#	  have the same client listed, but with different shared
34
+#	  secrets
35
+#
36
+#	FYI: We use an address in the 192.0.2.* space for this example,
37
+#	as RFC 3330 says that that /24 range is used for documenation
38
+#	and examples, and should not appear on the net.  You shouldn't
39
+#	use it for anything, either.
40
+#
41
+client 192.0.2.10 {
42
+	shortname	= example-client
43
+	secret		= testing123
44
+	virtual_server  = example
45
+}
46
+
47
+######################################################################
48
+#
49
+#	An example virtual server.  It starts off with "server name {"
50
+#	The "name" is used to reference this server from a "listen"
51
+#	or "client" section.
52
+#
53
+######################################################################
54
+server example {
55
+	#
56
+	#	Listen on 192.0.2.1:1812 for Access-Requests
57
+	#
58
+	#	When the server receives a packet, it is processed
59
+	#	through the "authorize", etc. sections listed here,
60
+	#	NOT the global ones the "default" site.
61
+	#
62
+	listen {
63
+		ipaddr = 192.0.2.1
64
+		port = 1821
65
+		type = auth
66
+	}
67
+
68
+	#
69
+	#	This client is listed within the "server" section,
70
+	#	and is therefore known ONLY to the socket defined
71
+	#	in the "listen" section above.  If the client IP
72
+	#	sends a request to a different socket, the server
73
+	#	will treat it as an unknown client, and will not
74
+	#	respond.
75
+	#
76
+	#	In contrast, the client listed at the top of this file
77
+	#	is outside of any "server" section, and is therefore
78
+	#	global in scope.  It can send packets to any port
79
+	#	defined in a global "listen" section.  It CANNOT send
80
+	#	packets to the listen section defined above, though.
81
+	#
82
+	#	Note that you don't have to have a "virtual_server = example"
83
+	#	line here, as the client is encapsulated within
84
+	#	the "server" section.
85
+	#
86
+	client 192.0.2.9 {
87
+		shortname	= example-client
88
+		secret		= testing123
89
+	}
90
+
91
+	authorize {
92
+		#
93
+		#  Some example policies.  See "man unlang" for more.
94
+		#
95
+		if ("%{User-Name}" == "bob") {
96
+			update control {
97
+				Cleartext-Password := "bob"
98
+			}
99
+		}
100
+
101
+		#
102
+		#  And then reject the user.  The next line requires
103
+		#  that the "always reject {}" section is defined in
104
+		#  the "modules" section of radiusd.conf.
105
+		#
106
+		reject
107
+	}
108
+
109
+	authenticate {
110
+
111
+	}
112
+
113
+	post-auth {
114
+
115
+		Post-Auth-Type Reject {
116
+			update reply {
117
+				Reply-Message = "This is only an example."
118
+			}
119
+		}
120
+	}
121
+
122
+}

+ 421
- 0
freeradius/config/tmp/freeradius/sites-available/inner-tunnel View File

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

+ 190
- 0
freeradius/config/tmp/freeradius/sites-available/originate-coa View File

@@ -0,0 +1,190 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#  The server can originate Change of Authorization (CoA) or
5
+#  Disconnect request packets.  These packets are used to dynamically
6
+#  change the parameters of a users session (bandwidth, etc.), or
7
+#  to forcibly disconnect the user.
8
+#
9
+#  There are some caveats.  Not all NAS vendors support this
10
+#  functionality.  Even for the ones that do, it may be difficult to
11
+#  find out what needs to go into a CoA-Request or Disconnect-Request
12
+#  packet.  All we can suggest is to read the NAS documentation
13
+#  available from the vendor.  That documentation SHOULD describe
14
+#  what information their equipment needs to see in a CoA packet.
15
+#
16
+#  This information is usually a list of attributes such as:
17
+#
18
+#	NAS-IP-Address (or NAS-IPv6 address)
19
+#	NAS-Identifier
20
+#	User-Name
21
+#	Acct-Session-Id
22
+#
23
+#  CoA packets can be originated when a normal Access-Request or
24
+#  Accounting-Request packet is received.  Simply update the
25
+#  "coa" list:
26
+#
27
+#	update coa {
28
+#	       User-Name = "%{User-Name}"
29
+#	       Acct-Session-Id = "%{Acct-Session-Id}"
30
+#	       NAS-IP-Address = "%{NAS-IP-Address}"
31
+#	}
32
+#
33
+#  And the CoA packet will be sent.  You can also send Disconnect
34
+#  packets by using "update disconnect { ...".
35
+#
36
+#  This "update coa" entry can be placed in any section (authorize,
37
+#  preacct, etc.), EXCEPT for pre-proxy and post-proxy.  The CoA
38
+#  packets CANNOT be sent if the original request has been proxied.
39
+#
40
+#  The CoA functionality works best when the RADIUS server and 
41
+#  the NAS receiving CoA packets are on the same network.
42
+#
43
+#  If "update coa { ... " is used, and then later it becomes necessary
44
+#  to not send a CoA request, the following example can suppress the
45
+#  CoA packet:
46
+#
47
+#	update control {
48
+#		Send-CoA-Request = No
49
+#	}
50
+#
51
+#  The default destination of a CoA packet is the NAS (or client)
52
+#  the sent the original Access-Request or Accounting-Request.  See
53
+#  raddb/clients.conf for a "coa_server" configuration that ties
54
+#  a client to a specific home server, or to a home server pool.
55
+#
56
+#  If you need to send the packet to a different destination, update
57
+#  the "coa" list with one of:
58
+#
59
+#	Packet-Dst-IP-Address = ...
60
+#	Packet-Dst-IPv6-Address = ...
61
+#	Home-Server-Pool = ...
62
+#
63
+#  That specifies an Ipv4 or IPv6 address, or a home server pool
64
+#  (such as the "coa" pool example below).  This use is not
65
+#  recommended, however,  It is much better to point the client
66
+#  configuration directly at the CoA server/pool, as outlined
67
+#  earlier.
68
+#
69
+#  If the CoA port is non-standard, you can also set:
70
+#
71
+#	Packet-Dst-Port
72
+#
73
+#  to have the value of the port.
74
+#
75
+######################################################################
76
+
77
+#
78
+#  When CoA packets are sent to a NAS, the NAS is acting as a
79
+#  server (see RFC 5176).  i.e. it has a type (accepts CoA and/or
80
+#  Disconnect packets), an IP address (or IPv6 address), a
81
+#  destination port, and a shared secret.
82
+#
83
+#  This information *cannot* go into a "client" section.  In the future,
84
+#  FreeRADIUS will be able to receive, and to proxy CoA packets.
85
+#  Having the CoA configuration as below means that we can later do
86
+#  load-balancing, fail-over, etc. of CoA servers.  If the CoA
87
+#  configuration went into a "client" section, it would be impossible
88
+#  to do proper proxying of CoA requests.
89
+#
90
+home_server localhost-coa {
91
+	type = coa
92
+
93
+	#
94
+	#  Note that a home server of type "coa" MUST be a real NAS,
95
+	#  with an ipaddr or ipv6addr.  It CANNOT point to a virtual
96
+	#  server.
97
+	#
98
+	ipaddr = 127.0.0.1
99
+	port = 3799
100
+
101
+	#  This secret SHOULD NOT be the same as the shared
102
+	#  secret in a "client" section.
103
+	secret = testing1234
104
+
105
+	#  CoA specific parameters.  See raddb/proxy.conf for details.
106
+	coa {
107
+		irt = 2
108
+		mrt = 16
109
+		mrc = 5
110
+		mrd = 30
111
+	}
112
+}
113
+
114
+#
115
+#  CoA servers can be put into pools, just like normal servers.
116
+#
117
+home_server_pool coa {
118
+	type = fail-over
119
+
120
+	# Point to the CoA server above.
121
+	home_server = localhost-coa
122
+
123
+	#  CoA requests are run through the pre-proxy section.
124
+	#  CoA responses are run through the post-proxy section.
125
+	virtual_server = originate-coa.example.com
126
+
127
+	#
128
+	#  Home server pools of type "coa" cannot (currently) have
129
+	#  a "fallback" configuration.
130
+	#
131
+}
132
+
133
+#
134
+#  When this virtual server is run, the original request has FINISHED
135
+#  processing.  i.e. the reply has already been sent to the NAS.
136
+#  You can access the attributes in the original packet, reply, and
137
+#  control items, but changing them will have NO EFFECT.
138
+#
139
+#  The CoA packet is in the "proxy-request" attribute list.
140
+#  The CoA reply (if any) is in the "proxy-reply" attribute list.
141
+#
142
+server originate-coa.example.com {
143
+  pre-proxy {
144
+	update proxy-request {
145
+		NAS-IP-Address = 127.0.0.1
146
+	}
147
+  }
148
+
149
+  #
150
+  # Handle the responses here.
151
+  #
152
+  post-proxy {
153
+	switch "%{proxy-reply:Packet-Type}" {
154
+		case CoA-ACK {
155
+			ok
156
+		}
157
+
158
+		case CoA-NAK {
159
+			# the NAS didn't like the CoA request
160
+			ok
161
+		}
162
+
163
+		case Disconnect-ACK {
164
+			ok
165
+		}
166
+
167
+		case Disconnect-NAK {
168
+			# the NAS didn't like the Disconnect request
169
+			ok
170
+		}
171
+
172
+		# Invalid packet type.  This shouldn't happen.
173
+		case {
174
+		     fail
175
+		}
176
+	}
177
+
178
+	#
179
+	#  These methods are run when there is NO response
180
+	#  to the request.
181
+	#
182
+	Post-Proxy-Type Fail-CoA {
183
+		ok
184
+	}
185
+
186
+	Post-Proxy-Type Fail-Disconnect {
187
+		ok
188
+	}
189
+  }
190
+}

+ 47
- 0
freeradius/config/tmp/freeradius/sites-available/proxy-inner-tunnel View File

@@ -0,0 +1,47 @@
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: 1ce4137d5f93ff65a92ebaac676690cc718846ad $
8
+#
9
+######################################################################
10
+
11
+server proxy-inner-tunnel {
12
+
13
+#
14
+#  This example is very simple.  All inner tunnel requests get
15
+#  proxied to another RADIUS server.
16
+#
17
+authorize {
18
+	#
19
+	#  Do other things here, as necessary.
20
+	#
21
+	#  e.g. run the "realms" module, to decide how to proxy
22
+	#  the inner tunnel request.
23
+	#
24
+
25
+	update control {
26
+		#  You should update this to be one of your realms.
27
+		Proxy-To-Realm := "example.com"
28
+	}
29
+}
30
+
31
+authenticate {
32
+	#
33
+	#  This is necessary so that the inner tunnel EAP-MSCHAPv2
34
+	#  method can be called.  That method takes care of turning
35
+	#  EAP-MSCHAPv2 into plain MS-CHAPv2, if necessary.
36
+	eap
37
+}
38
+
39
+post-proxy {
40
+	#
41
+	#  This is necessary for LEAP, or if you set:
42
+	#
43
+	#  proxy_tunneled_request_as_eap = no
44
+	#
45
+	eap
46
+}
47
+}

+ 167
- 0
freeradius/config/tmp/freeradius/sites-available/robust-proxy-accounting View File

@@ -0,0 +1,167 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	This is a sample configuration for robust proxy accounting.
5
+#	accounting packets are proxied, OR logged locally if all
6
+#	home servers are down.  When the home servers come back up,
7
+#	the accounting packets are forwarded.
8
+#
9
+#	This method enables the server to proxy all packets to the
10
+#	home servers when they're up, AND to avoid writing to the
11
+#	detail file in most situations.
12
+#
13
+#	In most situations, proxying of accounting messages is done
14
+#	in a "pass-through" fashion.  If the home server does not
15
+#	respond, then the proxy server does not respond to the NAS.
16
+#	That means that the NAS must retransmit packets, sometimes
17
+#	forever.  This example shows how the proxy server can still
18
+#	respond to the NAS, even if all home servers are down.
19
+#
20
+#	This configuration could be done MUCH more simply if ALL
21
+#	packets were written to the detail file.  But that would
22
+#	involve a lot more disk writes, which may not be a good idea.
23
+#
24
+#	This file is NOT meant to be used as-is.  It needs to be
25
+#	edited to match your local configuration.
26
+#
27
+#	$Id: 9bf86978db676ef16f6062f4d359385e291cc930 $
28
+#
29
+######################################################################
30
+
31
+#  (1) Define two home servers.
32
+home_server home1.example.com {
33
+	type = acct
34
+	ipaddr = 192.0.2.10
35
+	port = 1813
36
+	secret = testing123
37
+
38
+	#  Mark this home server alive ONLY when it starts being responsive
39
+	status_check = request
40
+	username = "test_user_status_check"
41
+
42
+	#  Set the response timeout aggressively low.
43
+	#  You MAY have to increase this, depending on tests with
44
+	#  your local installation.
45
+	response_window = 6
46
+}
47
+
48
+home_server home2.example.com {
49
+	type = acct
50
+	ipaddr = 192.0.2.20
51
+	port = 1813
52
+	secret = testing123
53
+
54
+	#  Mark this home server alive ONLY when it starts being responsive
55
+	status_check = request
56
+	username = "test_user_status_check"
57
+
58
+	#  Set the response timeout aggressively low.
59
+	#  You MAY have to increase this, depending on tests with
60
+	#  your local installation.
61
+	response_window = 6
62
+}
63
+
64
+#  (2) Define a virtual server to be used when both of the
65
+#  home servers are down.
66
+home_server acct_detail.example.com {
67
+	virtual_server = acct_detail.example.com
68
+}
69
+
70
+#  Put all of the servers into a pool.
71
+home_server_pool acct_pool.example.com {
72
+	type = load-balance	# other types are OK, too.
73
+
74
+	home_server = home1.example.com
75
+	home_server = home2.example.com
76
+	# add more home_server's here.
77
+
78
+	# If all home servers are down, try a home server that
79
+	# is a local virtual server.
80
+	fallback = acct_detail.example.com
81
+
82
+	# for pre/post-proxy policies
83
+	virtual_server = home.example.com
84
+}
85
+
86
+#  (3) Define a realm for these home servers.
87
+#  It should NOT be used as part of normal proxying decisions!
88
+realm acct_realm.example.com {
89
+	acct_pool = acct_pool.example.com
90
+}
91
+
92
+#  (4) Define a detail file writer.
93
+#   See raddb/modules/detail.example.com
94
+
95
+#  (5) Define the virtual server to write the packets to the detail file
96
+#  This will be called when ALL home servers are down, because of the
97
+#  "fallback" configuration in the home server pool.
98
+server acct_detail.example.com {
99
+	accounting {
100
+		detail.example.com
101
+	}
102
+}
103
+
104
+#  (6) Define a virtual server to handle pre/post-proxy re-writing
105
+server home.example.com {
106
+	pre-proxy {
107
+		#  Insert pre-proxy rules here
108
+	}
109
+
110
+	post-proxy {
111
+		#  Insert post-proxy rules here
112
+
113
+		#  This will be called when the CURRENT packet failed
114
+		#  to be proxied.  This may happen when one home server
115
+		#  suddenly goes down, even though another home server
116
+		#  may be alive.
117
+		#
118
+		#  i.e. the current request has run out of time, so it
119
+		#  cannot fail over to another (possibly) alive server.
120
+		#
121
+		#  We want to respond to the NAS, so that it can stop
122
+		#  re-sending the packet.  We write the packet to the
123
+		#  "detail" file, where it will be read, and sent to
124
+		#  another home server.
125
+		#
126
+		Post-Proxy-Type Fail {
127
+			detail.example.com
128
+		}
129
+	}
130
+
131
+
132
+	#  Read accounting packets from the detail file(s) for
133
+	#  the home server.
134
+	#
135
+	#  Note that you can have only ONE "listen" section reading
136
+	#  detail files from a particular directory.  That is why the
137
+	#  destination host name is used as part of the directory name
138
+	#  below.  Having two "listen" sections reading detail files
139
+	#  from the same directory WILL cause problems.  The packets
140
+	#  may be read by one, the other, or both "listen" sections.
141
+	listen {
142
+		type = detail
143
+		filename = "${radacctdir}/detail.example.com/detail-*:*"
144
+		load_factor = 10
145
+	}
146
+
147
+	#  All packets read from the detail file are proxied back to
148
+	#  the home servers.
149
+	#
150
+	#  The normal pre/post-proxy rules are applied to them, too.
151
+	#
152
+	#  If the home servers are STILL down, then the server stops
153
+	#  reading the detail file, and queues the packets for a later
154
+	#  retransmission.  The Post-Proxy-Type "Fail" handler is NOT
155
+	#  called.
156
+	#
157
+	#  When the home servers come back up, the packets are forwarded,
158
+	#  and the detail file processed as normal.
159
+	accounting {
160
+		# You may want accounting policies here...
161
+
162
+		update control {
163
+			Proxy-To-Realm := "acct_realm.example.com"
164
+		}
165
+	}
166
+
167
+}

+ 34
- 0
freeradius/config/tmp/freeradius/sites-available/soh View File

@@ -0,0 +1,34 @@
1
+# This is a simple server for the MS SoH requests generated by the
2
+# peap module - see "eap.conf" for more info
3
+
4
+# Requests are ONLY passed through the authorize section, and cannot
5
+# current be proxied (in any event, the radius attributes used are
6
+# internal).
7
+
8
+server soh-server {
9
+	authorize {
10
+		if (SoH-Supported == no) {
11
+			# client NAKed our request for SoH - not supported, or turned off
12
+			update config {
13
+				Auth-Type = Accept
14
+			}
15
+		}
16
+		else {
17
+			# client replied; check something - this is a local policy issue!
18
+			if (SoH-MS-Windows-Health-Status =~ /antivirus (warn|error) /) {
19
+				update config {
20
+					Auth-Type = Reject
21
+				}
22
+				update reply {
23
+					Reply-Message = "You must have antivirus enabled & installed!"
24
+				}
25
+			}
26
+			else {
27
+				update config {
28
+					Auth-Type = Accept
29
+				}
30
+			}
31
+		}
32
+	}
33
+}
34
+

+ 127
- 0
freeradius/config/tmp/freeradius/sites-available/status View File

@@ -0,0 +1,127 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	A virtual server to handle ONLY Status-Server packets.
5
+#
6
+#	Server statistics can be queried with a properly formatted
7
+#	Status-Server request.  See dictionary.freeradius for comments.
8
+#
9
+#	If radiusd.conf has "status_server = yes", then any client
10
+#	will be able to send a Status-Server packet to any port
11
+#	(listen section type "auth", "acct", or "status"), and the
12
+#	server will respond.
13
+#
14
+#	If radiusd.conf has "status_server = no", then the server will
15
+#	ignore Status-Server packets to "auth" and "acct" ports.  It
16
+#	will respond only if the Status-Server packet is sent to a
17
+#	"status" port.
18
+#
19
+#	The server statistics are available ONLY on socket of type
20
+#	"status".  Qeuries for statistics sent to any other port
21
+#	are ignored.
22
+#
23
+#	Similarly, a socket of type "status" will not process
24
+#	authentication or accounting packets.  This is for security.
25
+#
26
+#	$Id: 4e4f4179911adf96ca375a860d65903b86becade $
27
+#
28
+######################################################################
29
+
30
+server status {
31
+	listen {
32
+		#  ONLY Status-Server is allowed to this port.
33
+		#  ALL other packets are ignored.
34
+		type = status
35
+
36
+		ipaddr = 127.0.0.1
37
+		port = 18121
38
+	}
39
+
40
+	#
41
+	#  We recommend that you list ONLY management clients here.
42
+	#  i.e. NOT your NASes or Access Points, and for an ISP,
43
+	#  DEFINITELY not any RADIUS servers that are proxying packets
44
+	#  to you.
45
+	#
46
+	#  If you do NOT list a client here, then any client that is
47
+	#  globally defined (i.e. all of them) will be able to query
48
+	#  these statistics.
49
+	#
50
+	#  Do you really want your partners seeing the internal details
51
+	#  of what your RADIUS server is doing?
52
+	#
53
+	client admin {
54
+		ipaddr = 127.0.0.1
55
+		secret = adminsecret
56
+	}
57
+
58
+	#
59
+	#  Simple authorize section.  The "Autz-Type Status-Server"
60
+	#  section will work here, too.  See "raddb/sites-available/default".
61
+	authorize {
62
+		ok
63
+
64
+		# respond to the Status-Server request.
65
+		Autz-Type Status-Server {
66
+			ok
67
+		}
68
+	}
69
+}
70
+
71
+#	Statistics can be queried via a number of methods:
72
+#
73
+#	All packets received/sent by the server (1 = auth, 2 = acct)
74
+#		FreeRADIUS-Statistics-Type = 3
75
+#
76
+#	All packets proxied by the server (4 = proxy-auth, 8 = proxy-acct)
77
+#		FreeRADIUS-Statistics-Type = 12
78
+#
79
+#	All packets sent && received:
80
+#		FreeRADIUS-Statistics-Type = 15
81
+#
82
+#	Internal server statistics:
83
+#		FreeRADIUS-Statistics-Type = 16
84
+#
85
+#	All packets for a particular client (globally defined)
86
+#		FreeRADIUS-Statistics-Type = 35
87
+#		FreeRADIUS-Stats-Client-IP-Address = 192.168.1.1
88
+#
89
+#	All packets for a client attached to a "listen" ip/port
90
+#		FreeRADIUS-Statistics-Type = 35
91
+#		FreeRADIUS-Stats-Client-IP-Address = 192.168.1.1
92
+#		FreeRADIUS-Stats-Server-IP-Address = 127.0.0.1
93
+#		FreeRADIUS-Stats-Server-Port = 1812
94
+#
95
+#	All packets for a "listen" IP/port
96
+#		FreeRADIUS-Statistics-Type = 67
97
+#		FreeRADIUS-Stats-Server-IP-Address = 127.0.0.1
98
+#		FreeRADIUS-Stats-Server-Port = 1812
99
+#
100
+#	All packets for a home server IP / port
101
+#		FreeRADIUS-Statistics-Type = 131
102
+#		FreeRADIUS-Stats-Server-IP-Address = 192.168.1.2
103
+#		FreeRADIUS-Stats-Server-Port = 1812
104
+
105
+#
106
+#  You can also get exponentially weighted moving averages of
107
+#  response times (in usec) of home servers.  Just set the config
108
+#  item "historic_average_window" in a home_server section.
109
+#
110
+#  By default it is zero (don't calculate it).  Useful values
111
+#  are between 100, and 10,000.  The server will calculate and
112
+#  remember the moving average for this window, and for 10 times
113
+#  that window.
114
+#
115
+
116
+#
117
+#  Some of this could have been simplified.  e.g. the proxy-auth and
118
+#  proxy-acct bits aren't completely necessary.  But using them permits
119
+#  the server to be queried for ALL inbound && outbound packets at once.
120
+#  This gives a good snapshot of what the server is doing.
121
+#
122
+#  Due to internal limitations, the statistics might not be exactly up
123
+#  to date.  Do not expect all of the numbers to add up perfectly.
124
+#  The Status-Server packets are also counted in the total requests &&
125
+#  responses.  The responses are counted only AFTER the response has
126
+#  been sent.
127
+#

+ 26
- 0
freeradius/config/tmp/freeradius/sites-available/virtual.example.com View File

@@ -0,0 +1,26 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	Sample virtual server for internally proxied requests.
5
+#
6
+#	See the "realm virtual.example.com" example in "proxy.conf".
7
+#
8
+#	$Id: d8eff1c615627fdb5ac1d82a67b03f620de3a7a9 $
9
+#
10
+######################################################################
11
+
12
+#
13
+#  Sample contents: just do everything that the default configuration does.
14
+#
15
+#  You WILL want to edit this to your local needs.  We suggest copying
16
+#  the "default" file here, and then editing it.  That way, any
17
+#  changes to the 'default" file will not affect this virtual server,
18
+#  and vice-versa.
19
+#
20
+#  When this virtual server receives the request, the original
21
+#  attributes can be accessed as "outer.request", "outer.control", etc.
22
+#  See "man unlang" for more details.
23
+#
24
+server virtual.example.com {
25
+$INCLUDE	${confdir}/sites-available/default
26
+}

+ 98
- 0
freeradius/config/tmp/freeradius/sites-available/vmps View File

@@ -0,0 +1,98 @@
1
+# -*- text -*-
2
+######################################################################
3
+#
4
+#	As of version 2.0.0, the server also supports the VMPS
5
+#	protocol.
6
+#
7
+#	$Id: 13f4e955799583b1b8f843e8965465178ff6038f $
8
+#
9
+######################################################################
10
+
11
+server vmps {
12
+	listen {
13
+		# VMPS sockets only support IPv4 addresses.
14
+		ipaddr = *
15
+
16
+		#  Port on which to listen.
17
+		#  Allowed values are:
18
+		#	integer port number
19
+		#	1589 is the default VMPS port.
20
+		port = 1589
21
+
22
+		#  Type of packets to listen for.  Here, it is VMPS.
23
+		type = vmps
24
+
25
+		#  Some systems support binding to an interface, in addition
26
+		#  to the IP address.  This feature isn't strictly necessary,
27
+		#  but for sites with many IP addresses on one interface,
28
+		#  it's useful to say "listen on all addresses for
29
+		#  eth0".
30
+		#
31
+		#  If your system does not support this feature, you will
32
+		#  get an error if you try to use it.
33
+		#
34
+		#	interface = eth0
35
+	}
36
+
37
+	#  If you have switches that are allowed to send VMPS, but NOT
38
+	#  RADIUS packets, then list them here as "client" sections.
39
+	#
40
+	#  Note that for compatibility with RADIUS, you still have to
41
+	#  list a "secret" for each client, though that secret will not
42
+	#  be used for anything.
43
+
44
+
45
+	#  And the REAL contents.  This section is just like the
46
+	#  "post-auth" section of radiusd.conf.  In fact, it calls the
47
+	#  "post-auth" component of the modules that are listed here.
48
+	#  But it's called "vmps" to highlight that it's for VMPS.
49
+	#
50
+	vmps {
51
+		#
52
+		#  Some requests may not have a MAC address.  Try to
53
+		#  create one using other attributes.
54
+		if (!VMPS-Mac) {
55
+			if (VMPS-Ethernet-Frame =~ /0x.{12}(..)(..)(..)(..)(..)(..).*/) {
56
+        			update request {
57
+					VMPS-Mac = "%{1}:%{2}:%{3}:%{4}:%{5}:%{6}"
58
+				}
59
+			}
60
+			else {
61
+				update request {
62
+					VMPS-Mac = "%{VMPS-Cookie}"
63
+				}
64
+			}
65
+		}
66
+
67
+		#  Do a simple mapping of MAC to VLAN.
68
+		#
69
+		#  See radiusd.conf for the definition of the "mac2vlan"
70
+		#  module.
71
+		#
72
+		#mac2vlan
73
+
74
+		# required VMPS reply attributes
75
+		update reply {
76
+			VMPS-Packet-Type = VMPS-Join-Response
77
+			VMPS-Cookie = "%{VMPS-Mac}"
78
+
79
+			VMPS-VLAN-Name = "please_use_real_vlan_here"
80
+
81
+			#
82
+			#  If you have VLAN's in a database, you can select
83
+			#  the VLAN name based on the MAC address.
84
+			#
85
+			#VMPS-VLAN-Name = "%{sql:select ... where mac='%{VMPS-Mac}'}"
86
+		}
87
+		
88
+		# correct reply packet type for reconfirmation requests
89
+		#   
90
+		if (VMPS-Packet-Type == VMPS-Reconfirm-Request){
91
+			update reply {
92
+				VMPS-Packet-Type := VMPS-Reconfirm-Response
93
+			}
94
+		}
95
+	}
96
+
97
+	# Proxying of VMPS requests is NOT supported.
98
+}

+ 1
- 0
freeradius/config/tmp/freeradius/sites-enabled/default View File

@@ -0,0 +1 @@
1
+../sites-available/default

+ 1
- 0
freeradius/config/tmp/freeradius/sites-enabled/inner-tunnel View File

@@ -0,0 +1 @@
1
+../sites-available/inner-tunnel

+ 115
- 0
freeradius/config/tmp/freeradius/sql.conf View File

@@ -0,0 +1,115 @@
1
+# -*- text -*-
2
+##
3
+## sql.conf -- SQL modules
4
+##
5
+##	$Id: 6f346ec9f1d12190f132da20537f99607df71760 $
6
+
7
+######################################################################
8
+#
9
+#  Configuration for the SQL module
10
+#
11
+#  The database schemas and queries are located in subdirectories:
12
+#
13
+#	sql/DB/schema.sql	Schema
14
+#	sql/DB/dialup.conf	Basic dialup (including policy) queries
15
+#	sql/DB/counter.conf	counter
16
+#	sql/DB/ippool.conf	IP Pools in SQL
17
+#	sql/DB/ippool.sql	schema for IP pools.
18
+#
19
+#  Where "DB" is mysql, mssql, oracle, or postgresql.
20
+#
21
+
22
+sql {
23
+	#
24
+	#  Set the database to one of:
25
+	#
26
+	#	mysql, mssql, oracle, postgresql
27
+	#
28
+	database = "mysql"
29
+
30
+	#
31
+	#  Which FreeRADIUS driver to use.
32
+	#
33
+	driver = "rlm_sql_${database}"
34
+
35
+	# Connection info:
36
+	server = "localhost"
37
+	#port = 3306
38
+	login = "radius"
39
+	password = "radpass"
40
+
41
+	# Database table configuration for everything except Oracle
42
+	radius_db = "radius"
43
+	# If you are using Oracle then use this instead
44
+        # radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))"
45
+
46
+	# If you want both stop and start records logged to the
47
+	# same SQL table, leave this as is.  If you want them in
48
+	# different tables, put the start table in acct_table1
49
+	# and stop table in acct_table2
50
+	acct_table1 = "radacct"
51
+	acct_table2 = "radacct"
52
+
53
+	# Allow for storing data after authentication
54
+	postauth_table = "radpostauth"
55
+
56
+	authcheck_table = "radcheck"
57
+	authreply_table = "radreply"
58
+
59
+	groupcheck_table = "radgroupcheck"
60
+	groupreply_table = "radgroupreply"
61
+
62
+	# Table to keep group info
63
+	usergroup_table = "radusergroup"
64
+
65
+	# If set to 'yes' (default) we read the group tables
66
+	# If set to 'no' the user MUST have Fall-Through = Yes in the radreply table
67
+	# read_groups = yes
68
+
69
+	# Remove stale session if checkrad does not see a double login
70
+	deletestalesessions = yes
71
+
72
+	# Print all SQL statements when in debug mode (-x)
73
+	sqltrace = no
74
+	sqltracefile = ${logdir}/sqltrace.sql
75
+
76
+	# number of sql connections to make to server
77
+	#
78
+	# Setting this to LESS than the number of threads means
79
+	# that some threads may starve, and you will see errors
80
+	# like "No connections available and at max connection limit"
81
+	#
82
+	# Setting this to MORE than the number of threads means
83
+	# that there are more connections than necessary.
84
+	# 
85
+	num_sql_socks = ${thread[pool].max_servers}
86
+
87
+	# number of seconds to dely retrying on a failed database
88
+	# connection (per_socket)
89
+	connect_failure_retry_delay = 60
90
+
91
+	# lifetime of an SQL socket.  If you are having network issues
92
+	# such as TCP sessions expiring, you may need to set the socket
93
+	# lifetime.  If set to non-zero, any open connections will be
94
+	# closed "lifetime" seconds after they were first opened.
95
+	lifetime = 0
96
+
97
+	# Maximum number of queries used by an SQL socket.  If you are
98
+	# having issues with SQL sockets lasting "too long", you can
99
+	# limit the number of queries performed over one socket.  After
100
+	# "max_qeuries", the socket will be closed.  Use 0 for "no limit".
101
+	max_queries = 0
102
+
103
+	# Set to 'yes' to read radius clients from the database ('nas' table)
104
+	# Clients will ONLY be read on server startup.  For performance
105
+	# and security reasons, finding clients via SQL queries CANNOT
106
+	# be done "live" while the server is running.
107
+	# 
108
+	#readclients = yes
109
+
110
+	# Table to keep radius client info
111
+	nas_table = "nas"
112
+
113
+	# Read driver-specific configuration
114
+	$INCLUDE sql/${database}/dialup.conf
115
+}

+ 67
- 0
freeradius/config/tmp/freeradius/sqlippool.conf View File

@@ -0,0 +1,67 @@
1
+##  Configuration for the SQL based IP Pool module (rlm_sqlippool)
2
+##
3
+##  The database schemas are available at:
4
+##
5
+##       raddb/sql/DB/ippool.sql
6
+##
7
+##  $Id: 94fabc032f681407e9e6141d85ac1841c0b6d28b $
8
+
9
+sqlippool {
10
+
11
+ #########################################
12
+ ## SQL instance to use (from sql.conf) ##
13
+ ##
14
+ ##  If you have multiple sql instances, such as "sql sql1 {...}",
15
+ ##  use the *instance* name here: sql1.
16
+ #########################################
17
+ sql-instance-name = "sql"
18
+
19
+ ## SQL table to use for ippool range and lease info
20
+ ippool_table = "radippool"
21
+
22
+ ## IP lease duration. (Leases expire even if Acct Stop packet is lost)
23
+ lease-duration = 3600
24
+
25
+ ## Attribute which should be considered unique per NAS
26
+ ## Using NAS-Port gives behaviour similar to rlm_ippool. (And ACS)
27
+ ## Using Calling-Station-Id works for NAS that send fixed NAS-Port
28
+ ## ONLY change this if you know what you are doing!
29
+ pool-key = "%{NAS-Port}"
30
+ # pool-key = "%{Calling-Station-Id}"
31
+
32
+ ################################################################
33
+ #
34
+ #  WARNING: MySQL has certain limitations that means it can
35
+ #           hand out the same IP address to 2 different users.
36
+ #
37
+ #           We suggest using an SQL DB with proper transaction
38
+ #           support, such as PostgreSQL, or using MySQL
39
+ #	     with InnoDB.
40
+ #
41
+ ################################################################
42
+
43
+ #
44
+ #  Use the same database as configured in the "sql" module, "database"
45
+ #  configuration item.  Change the "postgresql" name below to be the
46
+ #  same as the "database" field of the SQL module referred to in the
47
+ #  "sql-instance-name", above.
48
+ #
49
+$INCLUDE sql/postgresql/ippool.conf
50
+ 
51
+ ## Logging configuration. (Comment out to disable logging)
52
+ sqlippool_log_exists = "Existing IP: %{reply:Framed-IP-Address} \
53
+  (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
54
+
55
+ sqlippool_log_success = "Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} \
56
+  (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
57
+
58
+ sqlippool_log_clear = "Released IP %{Framed-IP-Address}\
59
+ (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"
60
+
61
+ sqlippool_log_failed = "IP Allocation FAILED from %{control:Pool-Name} \
62
+  (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
63
+
64
+ sqlippool_log_nopool = "No Pool-Name defined \
65
+  (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
66
+
67
+}

+ 108
- 0
freeradius/config/tmp/freeradius/templates.conf View File

@@ -0,0 +1,108 @@
1
+# -*- text -*-
2
+##
3
+## templates.conf -- configurations to be used in multiple places
4
+##
5
+##	$Id: c26e7d3945427350ebe8995f6c197efaecec5eb4 $
6
+
7
+######################################################################
8
+#
9
+#  Version 2.0 has a useful new feature called "templates".
10
+#
11
+#  Use templates by adding a line in radiusd.conf:
12
+#
13
+#	$INCLUDE templates.conf
14
+#
15
+#  The goal of the templates is to have common configuration located
16
+#  in this file, and to list only the *differences* in the individual
17
+#  sections.  This feature is most useful for sections like "clients"
18
+#  or "home_servers", where many may be defined, and each one has
19
+#  similar repeated configuration.
20
+#
21
+#  Something similar to templates can be done by putting common
22
+#  configuration into separate files, and using "$INCLUDE file...",
23
+#  but this is more flexible, and simpler to understand.  It's also
24
+#  cheaper for the server, because "$INCLUDE" makes a copy of the
25
+#  configuration for inclusion, and templates are simply referenced.
26
+#
27
+#  The templates are defined in the "templates" section, so that they
28
+#  do not affect the rest of the server configuration.
29
+#
30
+#  A section can reference a template by using "$template name"
31
+#
32
+templates {
33
+	  #
34
+	  #  The contents of the templates section are other
35
+	  #  configuration sections that would normally go into
36
+	  #  the configuration files.
37
+	  #
38
+
39
+	  #
40
+	  #  This is a default template for the "home_server" section.
41
+	  #  Note that there is no name for the section.
42
+	  #
43
+	  #  Any configuration item that is valid for a "home_server"
44
+	  #  section is also valid here.  When a "home_server" section
45
+	  #  is defined in proxy.conf, this section is referenced as
46
+	  #  the template.
47
+	  #
48
+	  #  Configuration items that are explicitly listed in a
49
+	  #  "home_server" section of proxy.conf are used in
50
+	  #  preference to the configuration items listed here.
51
+	  #
52
+	  #  However, if a configuration item is NOT listed in a
53
+	  #  "home_server" section of proxy.conf, then the value here
54
+	  #  is used.
55
+	  #
56
+	  #  This functionality lets you put common configuration into
57
+	  #  a template, and to put only the unique configuration
58
+	  #  items in "proxy.conf".  Each section in proxy.conf can
59
+	  #  then contain a line "$template home_server", which will
60
+	  #  cause it to reference this template.
61
+	  #
62
+	  home_server {
63
+		      	response_window = 20
64
+			zombie_period = 40
65
+			revive_interval = 120
66
+			#
67
+			#  Etc.
68
+	  }
69
+
70
+	  #
71
+	  #  You can also have named templates.  For example, if you
72
+	  #  are proxying to 3 different home servers all at the same
73
+	  #  site, with identical configurations (other than IP
74
+	  #  addresses), you can use this named template.
75
+	  #
76
+
77
+	  #  Then, each "home_server" section in "proxy.conf" would
78
+	  #  only list the IP address of that home server, and a
79
+	  #  line saying
80
+	  #
81
+	  #		$template example_com
82
+	  #
83
+	  #  That would tell FreeRADIUS to look in the section below
84
+	  #  for the rest of the configuration items.
85
+	  #
86
+	  #  For various reasons, you shouldn't have a "." in the template
87
+	  #  name.  Doing so means that the server will be unable to find
88
+	  #  the template.
89
+	  #
90
+	  example_com {
91
+		      type = auth
92
+		      port = 1812
93
+		      secret = testing123
94
+		      response_window = 20
95
+		      #
96
+		      # Etc...
97
+	  }
98
+
99
+	  #
100
+	  #  You can have templates for other sections, too, but they
101
+	  #  seem to be most useful for home_servers.
102
+	  #
103
+	  #  For now, you can use templates only for sections in
104
+	  #  radiusd.conf, not sub-sections.  So you still have to use
105
+	  #  the "$INCLUDE file.." method for things like defining
106
+	  #  multiple "sql" modules, each with similar configuration.
107
+	  #	  
108
+}

+ 206
- 0
freeradius/config/tmp/freeradius/users View File

@@ -0,0 +1,206 @@
1
+#
2
+# Please read the documentation file ../doc/processing_users_file,
3
+# or 'man 5 users' (after installing the server) for more information.
4
+#
5
+# This file contains authentication security and configuration
6
+# information for each user.  Accounting requests are NOT processed
7
+# through this file.  Instead, see 'acct_users', in this directory.
8
+#
9
+# The first field is the user's name and can be up to
10
+# 253 characters in length.  This is followed (on the same line) with
11
+# the list of authentication requirements for that user.  This can
12
+# include password, comm server name, comm server port number, protocol
13
+# type (perhaps set by the "hints" file), and huntgroup name (set by
14
+# the "huntgroups" file).
15
+#
16
+# If you are not sure why a particular reply is being sent by the
17
+# server, then run the server in debugging mode (radiusd -X), and
18
+# you will see which entries in this file are matched.
19
+#
20
+# When an authentication request is received from the comm server,
21
+# these values are tested. Only the first match is used unless the
22
+# "Fall-Through" variable is set to "Yes".
23
+#
24
+# A special user named "DEFAULT" matches on all usernames.
25
+# You can have several DEFAULT entries. All entries are processed
26
+# in the order they appear in this file. The first entry that
27
+# matches the login-request will stop processing unless you use
28
+# the Fall-Through variable.
29
+#
30
+# If you use the database support to turn this file into a .db or .dbm
31
+# file, the DEFAULT entries _have_ to be at the end of this file and
32
+# you can't have multiple entries for one username.
33
+#
34
+# Indented (with the tab character) lines following the first
35
+# line indicate the configuration values to be passed back to
36
+# the comm server to allow the initiation of a user session.
37
+# This can include things like the PPP configuration values
38
+# or the host to log the user onto.
39
+#
40
+# You can include another `users' file with `$INCLUDE users.other'
41
+#
42
+
43
+#
44
+# For a list of RADIUS attributes, and links to their definitions,
45
+# see:
46
+#
47
+# http://www.freeradius.org/rfc/attributes.html
48
+#
49
+
50
+#
51
+# Deny access for a specific user.  Note that this entry MUST
52
+# be before any other 'Auth-Type' attribute which results in the user
53
+# being authenticated.
54
+#
55
+# Note that there is NO 'Fall-Through' attribute, so the user will not
56
+# be given any additional resources.
57
+#
58
+#lameuser Auth-Type := Reject
59
+#   Reply-Message = "Your account has been disabled."
60
+
61
+#
62
+# Deny access for a group of users.
63
+#
64
+# Note that there is NO 'Fall-Through' attribute, so the user will not
65
+# be given any additional resources.
66
+#
67
+#DEFAULT  Group == "disabled", Auth-Type := Reject
68
+#   Reply-Message = "Your account has been disabled."
69
+#
70
+
71
+#
72
+# This is a complete entry for "steve". Note that there is no Fall-Through
73
+# entry so that no DEFAULT entry will be used, and the user will NOT
74
+# get any attributes in addition to the ones listed here.
75
+#
76
+#steve  Cleartext-Password := "testing"
77
+# Service-Type = Framed-User,
78
+# Framed-Protocol = PPP,
79
+# Framed-IP-Address = 172.16.3.33,
80
+# Framed-IP-Netmask = 255.255.255.0,
81
+# Framed-Routing = Broadcast-Listen,
82
+# Framed-Filter-Id = "std.ppp",
83
+# Framed-MTU = 1500,
84
+# Framed-Compression = Van-Jacobsen-TCP-IP
85
+
86
+#
87
+# This is an entry for a user with a space in their name.
88
+# Note the double quotes surrounding the name.
89
+#
90
+#"John Doe" Cleartext-Password := "hello"
91
+#   Reply-Message = "Hello, %{User-Name}"
92
+
93
+#
94
+# Dial user back and telnet to the default host for that port
95
+#
96
+#Deg  Cleartext-Password := "ge55ged"
97
+# Service-Type = Callback-Login-User,
98
+# Login-IP-Host = 0.0.0.0,
99
+# Callback-Number = "9,5551212",
100
+# Login-Service = Telnet,
101
+# Login-TCP-Port = Telnet
102
+
103
+#
104
+# Another complete entry. After the user "dialbk" has logged in, the
105
+# connection will be broken and the user will be dialed back after which
106
+# he will get a connection to the host "timeshare1".
107
+#
108
+#dialbk Cleartext-Password := "callme"
109
+# Service-Type = Callback-Login-User,
110
+# Login-IP-Host = timeshare1,
111
+# Login-Service = PortMaster,
112
+# Callback-Number = "9,1-800-555-1212"
113
+
114
+#
115
+# user "swilson" will only get a static IP number if he logs in with
116
+# a framed protocol on a terminal server in Alphen (see the huntgroups file).
117
+#
118
+# Note that by setting "Fall-Through", other attributes will be added from
119
+# the following DEFAULT entries
120
+#
121
+#swilson  Service-Type == Framed-User, Huntgroup-Name == "alphen"
122
+#   Framed-IP-Address = 192.168.1.65,
123
+#   Fall-Through = Yes
124
+
125
+#
126
+# If the user logs in as 'username.shell', then authenticate them
127
+# using the default method, give them shell access, and stop processing
128
+# the rest of the file.
129
+#
130
+#DEFAULT  Suffix == ".shell"
131
+#   Service-Type = Login-User,
132
+#   Login-Service = Telnet,
133
+#   Login-IP-Host = your.shell.machine
134
+
135
+
136
+#
137
+# The rest of this file contains the several DEFAULT entries.
138
+# DEFAULT entries match with all login names.
139
+# Note that DEFAULT entries can also Fall-Through (see first entry).
140
+# A name-value pair from a DEFAULT entry will _NEVER_ override
141
+# an already existing name-value pair.
142
+#
143
+
144
+#
145
+# Set up different IP address pools for the terminal servers.
146
+# Note that the "+" behind the IP address means that this is the "base"
147
+# IP address. The Port-Id (S0, S1 etc) will be added to it.
148
+#
149
+#DEFAULT  Service-Type == Framed-User, Huntgroup-Name == "alphen"
150
+#   Framed-IP-Address = 192.168.1.32+,
151
+#   Fall-Through = Yes
152
+
153
+#DEFAULT  Service-Type == Framed-User, Huntgroup-Name == "delft"
154
+#   Framed-IP-Address = 192.168.2.32+,
155
+#   Fall-Through = Yes
156
+
157
+#
158
+# Sample defaults for all framed connections.
159
+#
160
+#DEFAULT  Service-Type == Framed-User
161
+# Framed-IP-Address = 255.255.255.254,
162
+# Framed-MTU = 576,
163
+# Service-Type = Framed-User,
164
+# Fall-Through = Yes
165
+
166
+#
167
+# Default for PPP: dynamic IP address, PPP mode, VJ-compression.
168
+# NOTE: we do not use Hint = "PPP", since PPP might also be auto-detected
169
+# by the terminal server in which case there may not be a "P" suffix.
170
+# The terminal server sends "Framed-Protocol = PPP" for auto PPP.
171
+#
172
+DEFAULT Framed-Protocol == PPP
173
+  Framed-Protocol = PPP,
174
+  Framed-Compression = Van-Jacobson-TCP-IP
175
+
176
+#
177
+# Default for CSLIP: dynamic IP address, SLIP mode, VJ-compression.
178
+#
179
+DEFAULT Hint == "CSLIP"
180
+  Framed-Protocol = SLIP,
181
+  Framed-Compression = Van-Jacobson-TCP-IP
182
+
183
+#
184
+# Default for SLIP: dynamic IP address, SLIP mode.
185
+#
186
+DEFAULT Hint == "SLIP"
187
+  Framed-Protocol = SLIP
188
+
189
+#
190
+# Last default: rlogin to our main server.
191
+#
192
+#DEFAULT
193
+# Service-Type = Login-User,
194
+# Login-Service = Rlogin,
195
+# Login-IP-Host = shellbox.ispdomain.com
196
+
197
+# #
198
+# # Last default: shell on the local terminal server.
199
+# #
200
+# DEFAULT
201
+#   Service-Type = Administrative-User
202
+
203
+# MUST be cleartext
204
+root Cleartext-Password := "toor42"
205
+
206
+# On no match, the user is denied access.

Loading…
Cancel
Save