Updated
[freeradius.git] / man / man5 / rlm_attr_filter.5
1 .TH rlm_attr_filter 5 "3 February 2004" "" "FreeRADIUS Module"
2 .SH NAME
3 rlm_attr_filter \- FreeRADIUS Module
4 .SH DESCRIPTION
5 The \fIrlm_attr_filter\fP module exists for filtering certain
6 attributes and values in received ( or transmitted ) radius packets.
7 It gives the server a flexible framework to filter the attributes we
8 send to or receive from home servers or NASes.  This makes sense, for
9 example, in an out-sourced dialup situation to various policy
10 decisions, such as restricting a client to certain ranges of
11 Idle-Timeout or Session-Timeout.
12 .PP
13 Filter rules are normally defined and applied on a per-realm basis,
14 where the realm is anything that is defined and matched based on the
15 configuration of the \fIrlm_realm\fP module.  Filter rules can
16 optionally be applied using another attribute, by editing the
17 \fIkey\fP configuration for this module.
18 .PP
19 The file that defines the attribute filtering rules follows a similar
20 syntax to the \fIusers\fP file.  There are a few differences however:
21 .PP
22 .DS
23     There are no check-items allowed other than the name of the key.
24 .PP
25     There can only be a single DEFAULT entry.
26 .PP
27 The rules for each entry are parsed to top to bottom, and an
28 attribute must pass *all* the rules which affect it in order to
29 make it past the filter.  Order of the rules is important.
30 The operators and their purpose in defining the rules are as
31 follows:
32 .TP
33 .B =   
34 THIS OPERATOR IS NOT ALLOWED.  If used, and warning message is
35 printed and it is treated as ==
36 .TP
37 .B :=  
38 Set, this attribute and value will always be placed in the
39 output A/V Pairs.  If the attribute exists, it is overwritten.
40 .TP
41 .B  ==  
42 Equal, value must match exactly.
43 .TP
44 .B  =*  
45 Always Equal, allow all values for the specified attribute.
46 .TP
47 .B    !*  
48 Never Equal, disallow all values for the specified attribute.
49 ( This is redundant, as any A/V Pair not explicitly permitted
50 will be dropped ).
51 .TP
52 .B    !=  
53 Not Equal, value must not match.
54 .TP
55 .B    >=  
56 Greater Than or Equal
57 .TP
58 .B    <=  
59 Less Than or Equal
60 .TP
61 .B    >   
62 Greater Than
63 .TP
64 .B    <   
65 Less Than
66 .PP
67 If regular expressions are enabled the following operators are
68 also possible.  ( Regular Expressions are included by default
69 unless your system doesn't support them, which should be rare ).
70 The value field uses standard regular expression syntax.
71 .PP
72 .TP
73 .B    =~  
74 Regular Expression Equal
75 .TP
76 .B    !~  
77 Regular Expression Not Equal
78 .PP
79 See the default \fI/etc/raddb/attrs\fP for working examples of
80 sample rule ordering and how to use the different operators.
81 .DE
82 .PP
83 The configuration items are:
84 .IP attrsfile
85 This specifies the location of the file used to load the filter rules.
86 This file is used to filter the accounting response, packet before it
87 is proxied, proxy response from the home server, or our response to
88 the NAS.
89 .IP key
90 Usually %{Realm} (the default).  Can also be %{User-Name}, or other
91 attribute that exists in the request.  Note that the module always
92 keys off of attributes in the request, and NOT in any other packet.
93 .PP
94 .SH SECTIONS
95 .BR accounting,
96 .BR pre-proxy,
97 .BR post-proxy,
98 .BR post-auth
99 .PP
100 .SH FILES
101 .I /etc/raddb/radiusd.conf
102 .I /etc/raddb/attrs
103 .PP
104 .SH "SEE ALSO"
105 .BR radiusd (8),
106 .BR radiusd.conf (5)
107 .SH AUTHOR
108 Chris Parker, cparker@segv.org
109