Always distribute radsecproxy-hash.1.
[libradsec.git] / radsecproxy.conf-example
1 # Master config file, must be in /etc/radsecproxy or specified with -c option
2 #       All possible config options are listed below
3
4 # First you may define any global options, these are:
5 #
6 # You can optionally specify addresses and ports to listen on
7 # Multiple statements can be used for multiple ports/addresses
8 #ListenUDP              *:1814
9 #ListenUDP              localhost
10 #ListenTCP              [2001:700:1:7:215:f2ff:fe35:307d]:1812
11 #ListenTLS              10.10.10.10:2084
12 #ListenTLS              [2001:700:1:7:215:f2ff:fe35:307d]:2084
13 #ListenDTLS             [2001:700:1:7:215:f2ff:fe35:307d]:2084
14
15 # To specify a certain address/port for UDP/TLS requests you can use e.g.
16 #SourceUDP              127.0.0.1:33000
17 #SourceTCP              *:33000
18 #SourceTLS              *:33001
19 #SourceDTLS             *:33001
20
21 # Optional log level. 3 is default, 1 is less, 5 is more
22 #LogLevel               3
23 # Optional LogDestination, else stderr used for logging
24 # Logging to file
25 #LogDestination         file:///tmp/rp.log
26 # Or logging with Syslog. LOG_DAEMON used if facility not specified
27 # The supported facilities are LOG_DAEMON, LOG_MAIL, LOG_USER and
28 # LOG_LOCAL0, ..., LOG_LOCAL7
29 #LogDestination         x-syslog:///
30 #LogDestination         x-syslog:///log_local2
31
32 # For generating log entries conforming to the F-Ticks system, specify
33 # FTicksReporting with one of the following values.
34 #   None  -- Do not log in F-Ticks format.  This is the default.
35 #   Basic -- Do log in F-Ticks format but do not log VISINST.
36 #   Full  -- Do log in F-Ticks format and do log VISINST.
37 # Please note that in order to get F-Ticks logging for a given client,
38 # its matching client configuration block has to contain the
39 # fticksVISCOUNTRY option.
40
41 # You can optionally specify FTicksMAC in order to determine if and
42 # how Calling-Station-Id is logged.
43 #   Static          -- Use a static string as a placeholder for
44 #                      Calling-Station-Id.  This is the default.
45 #   Original        -- Log Calling-Station-Id as-is.
46 #   VendorHashed    -- Keep first three segments as-is, hash the rest.
47 #   VendorKeyHashed -- Like VendorHashed but salt with F-Ticks-Key.
48 #   FullyHashed     -- Hash the entire string.
49 #   FullyKeyHashed  -- Like FullyHashed but salt with F-Ticks-Key.
50
51 # In order to use FTicksMAC with one of VendorKeyHashed or
52 # FullyKeyHashed, specify a key with FTicksKey.
53 # FTicksKey <key>
54
55 # Default F-Ticks configuration:
56 #FTicksReporting None
57 #FTicksMAC Static
58
59 # There is an option for doing some simple loop prevention.  Note that
60 # the LoopPrevention directive can be used in server blocks too,
61 # overriding what's set here in the basic settings.
62 #LoopPrevention         on
63 # Add TTL attribute with value 20 if not present (prevents endless loops)
64 #AddTTL 20
65
66 # If we have TLS clients or servers we must define at least one tls block.
67 # You can name them whatever you like and then reference them by name when
68 # specifying clients or servers later. There are however three special names
69 # "default", "defaultclient" and "defaultserver". If no name is defined for
70 # a client, the "defaultclient" block will be used if it exists, if not the
71 # "default" will be used. For a server, "defaultserver" followed by "default"
72 # will be checked.
73 #
74 # The simplest configuration you can do is:
75 tls default {
76     # You must specify at least one of CACertificateFile or CACertificatePath
77     # for TLS to work. We always verify peer certificate (client and server)
78     # CACertificateFile    /etc/cacerts/CA.pem
79     CACertificatePath   /etc/cacerts
80
81     # You must specify the below for TLS, we always present our certificate
82     CertificateFile     /etc/hostcertkey/host.example.com.pem
83     CertificateKeyFile  /etc/hostcertkey/host.example.com.key.pem
84     # Optionally specify password if key is encrypted (not very secure)
85     CertificateKeyPassword      "follow the white rabbit"
86     # Optionally enable CRL checking
87     # CRLCheck on
88     # Optionally specify how long CAs and CRLs are cached, default forever
89     # CacheExpiry 3600
90     # Optionally require that peer certs have one of the specified policyOIDs
91     # policyoid     1.2.3 # this option can be used multiple times
92     # policyoid     1.3.4
93 }
94
95 # If you want one cert for all clients and another for all servers, use
96 # defaultclient and defaultserver instead of default. If we wanted some
97 # particular server to use something else you could specify a block
98 # "tls myserver" and then reference that for that server. If you always
99 # name the tls block in the client/server config you don't need a default
100
101 # Now we configure clients, servers and realms. Note that these and
102 # also the lines above may be in any order, except that a realm
103 # can only be configured to use a server that is previously configured.
104
105 # A realm can be a literal domain name, * which matches all, or a
106 # regexp. A regexp is specified by the character prefix /
107 # For regexp we do case insensitive matching of the entire username string.
108 # The matching of realms is done in the order they are specified, using the
109 # first match found. Some examples are
110 # "@example\.com$", "\.com$", ".*" and "^[a-z].*@example\.com$".
111 # To treat local users separately you might try first specifying "@"
112 # and after that "*".
113
114 # Configure a rewrite block if you want to add/remove/modify attributes
115 # rewrite example {
116 #       # Remove NAS-Port.
117 #       removeAttribute 5
118 #       # Remove vendor attribute 100.
119 #       removeVendorAttribute 99:100
120 #       # Called-Station-Id = "123456"
121 #       addAttribute 30:123456
122 #       # Vendor-99-Attr-101 = 0x0f
123 #       addVendorAttribute 99:101:%0f
124 #       # Change users @local to @example.com.
125 #       modifyAttribute 1:/^(.*)@local$/\1@example.com/
126 # }
127
128 client 2001:db8::1 {
129         type    tls
130         secret  verysecret
131 # we could specify tls here, e.g.
132 #       tls myclient
133 # in order to use tls parameters named myclient. We don't, so we will
134 # use "tls defaultclient" if defined, or look for "tls default" as a
135 # last resort
136 }
137 client 127.0.0.1 {
138         type    udp
139         secret  secret
140 #       Might do rewriting of incoming messages using rewrite block example
141 #       rewriteIn example
142 #       Can also do rewriting of outgoing messages
143 #       rewriteOut example      
144 }
145 client 127.0.0.1 {
146         type    tcp
147         secret  secret
148 }
149 client radius.example.com {
150         type tls
151 # secret is optional for TLS
152 }
153 client radius.example.com {
154         type dtls
155 # secret is optional for DTLS
156 }
157
158 server 127.0.0.1 {
159         type    UDP
160         secret  secret
161 #       Might do rewriting of incoming messages using rewrite block example
162 #       rewriteIn example
163 #       Can also do rewriting of outgoing messages
164 #       rewriteOut example      
165 #       Might override loop prevention here too:
166 #       LoopPrevention off
167 }
168 realm   eduroam.cc {
169         server  127.0.0.1
170 # If also want to use this server for accounting, specify
171 #       accountingServer 127.0.0.1
172 }
173
174 server 2001:db8::1 {
175         type    TLS
176         port    2283
177 # secret is optional for TLS
178 # we could specify tls here, e.g.
179 #       tls myserver
180 # in order to use tls parameters named myserver. We don't, so we will
181 # use "tls defaultserver" if defined, or look for "tls default" as a
182 # last resort
183 }
184 server radius.example.com {
185         type    tls
186         secret  verysecret
187         StatusServer on
188 # statusserver is optional, can be on or off. Off is default
189 }
190 #server radius.example.com {
191 #       type    dtls
192 #       secret  verysecret
193 #       StatusServer on
194 ## statusserver is optional, can be on or off. Off is default
195 #}
196
197 # Equivalent to example.com
198 realm /@example\.com$ {
199         server 2001:db8::1
200 }
201 # One can define a realm without servers, the proxy will then reject
202 # and requests matching this. Optionally one can specify ReplyMessage
203 # attribute to be included in the reject message. One can also use
204 # AccountingResponse option to specify that the proxy should send such.
205 realm /\.com$ {
206 }
207 realm /^anonymous$ {
208         replymessage "No Access"
209 #       AccountingResponse On
210 }
211 # The realm below is equivalent to /.*
212 realm * {
213         server radius.example.com
214 }
215 # If you don't have a default server you probably want to
216 # reject all unknowns. Optionally you can also include a message
217 #realm * {
218 #        replymessage "User unknown"
219 #}