Fix typo for addAttribute value.
[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 # Optional log level. 3 is default, 1 is less, 4 is more
21 #LogLevel               3
22 # Optional LogDestinatinon, else stderr used for logging
23 # Logging to file
24 #LogDestination         file:///tmp/rp.log
25 # Or logging with Syslog. LOG_DAEMON used if facility not specified
26 # The supported facilities are LOG_DAEMON, LOG_MAIL, LOG_USER and
27 # LOG_LOCAL0, ..., LOG_LOCAL7
28 #LogDestination         x-syslog:///
29 #LogDestination         x-syslog:///log_local2
30
31 # There is an option for doing some simple loop prevention
32 #LoopPrevention         on
33 # Add TTL attribute with value 20 if not present (prevents endless loops)
34 #addTTL 20
35
36 # If we have TLS clients or servers we must define at least one tls block.
37 # You can name them whatever you like and then reference them by name when
38 # specifying clients or servers later. There are however three special names
39 # "default", "defaultclient" and "defaultserver". If no name is defined for
40 # a client, the "defaultclient" block will be used if it exists, if not the
41 # "default" will be used. For a server, "defaultserver" followed by "default"
42 # will be checked.
43 #
44 # The simplest configuration you can do is:
45 tls default {
46     # You must specify at least one of CACertificateFile or CACertificatePath
47     # for TLS to work. We always verify peer certificate (client and server)
48     # CACertificateFile    /etc/cacerts/CA.pem
49     CACertificatePath   /etc/cacerts
50
51     # You must specify the below for TLS, we always present our certificate
52     CertificateFile     /etc/hostcertkey/host.example.com.pem
53     CertificateKeyFile  /etc/hostcertkey/host.example.com.key.pem
54     # Optionally specify password if key is encrypted (not very secure)
55     CertificateKeyPassword      "follow the white rabbit"
56     # Optionally enable CRL checking
57     # CRLCheck on
58     # Optionally specify how long CAs and CRLs are cached, default forever
59     # CacheExpiry 3600
60     # Optionally require that peer certs have one of the specified policyOIDs
61     # policyoid     1.2.3 # this option can be used multiple times
62     # policyoid     1.3.4
63 }
64
65 # If you want one cert for all clients and another for all servers, use
66 # defaultclient and defaultserver instead of default. If we wanted some
67 # particular server to use something else you could specify a block
68 # "tls myserver" and then reference that for that server. If you always
69 # name the tls block in the client/server config you don't need a default
70
71 # Now we configure clients, servers and realms. Note that these and
72 # also the lines above may be in any order, except that a realm
73 # can only be configured to use a server that is previously configured.
74
75 # A realm can be a literal domain name, * which matches all, or a
76 # regexp. A regexp is specified by the character prefix /
77 # For regexp we do case insensitive matching of the entire username string.
78 # The matching of realms is done in the order they are specified, using the
79 # first match found. Some examples are
80 # "@example\.com$", "\.com$", ".*" and "^[a-z].*@example\.com$".
81 # To treat local users separately you might try first specifying "@"
82 # and after that "*".
83
84 # Configure a rewrite block if you want to add/remove/modify attributes
85 # rewrite example {
86 #       removeAttribute 5
87 #       removeVendorAttribute 99:100
88 #       addAttribute 4:11
89 #       addVendorAttribute 99:100:200
90 #       modifyAttribute 1:/^(.*)@local$/\1@example.com/
91 # }
92
93 client 2001:db8::1 {
94         type    tls
95         secret  verysecret
96 # we could specify tls here, e.g.
97 #       tls myclient
98 # in order to use tls parameters named myclient. We don't, so we will
99 # use "tls defaultclient" if defined, or look for "tls default" as a
100 # last resort
101 }
102 client 127.0.0.1 {
103         type    udp
104         secret  secret
105 #       Might do rewriting of incoming messages using rewrite block example
106 #       rewriteIn example
107 #       Can also do rewriting of outgoing messages
108 #       rewriteOut example      
109 }
110 client 127.0.0.1 {
111         type    tcp
112         secret  secret
113 }
114 client radius.example.com {
115         type tls
116 # secret is optional for TLS
117 }
118 client radius.example.com {
119         type dtls
120 # secret is optional for DTLS
121 }
122
123 server 127.0.0.1 {
124         type    UDP
125         secret  secret
126 #       Might do rewriting of incoming messages using rewrite block example
127 #       rewriteIn example
128 #       Can also do rewriting of outgoing messages
129 #       rewriteOut example      
130 }
131 realm   eduroam.cc {
132         server  127.0.0.1
133 # If also want to use this server for accounting, specify
134 #       accountingServer 127.0.0.1
135 }
136
137 server 2001:db8::1 {
138         type    TLS
139         port    2283
140 # secret is optional for TLS
141 # we could specify tls here, e.g.
142 #       tls myserver
143 # in order to use tls parameters named myserver. We don't, so we will
144 # use "tls defaultserver" if defined, or look for "tls default" as a
145 # last resort
146 }
147 server radius.example.com {
148         type    tls
149         secret  verysecret
150         StatusServer on
151 # statusserver is optional, can be on or off. Off is default
152 }
153 #server radius.example.com {
154 #       type    dtls
155 #       secret  verysecret
156 #       StatusServer on
157 ## statusserver is optional, can be on or off. Off is default
158 #}
159
160 # Equivalent to example.com
161 realm /@example\.com$ {
162         server 2001:db8::1
163 }
164 # One can define a realm without servers, the proxy will then reject
165 # and requests matching this. Optionally one can specify ReplyMessage
166 # attribute to be included in the reject message. One can also use
167 # AccountingResponse option to specify that the proxy should send such.
168 realm /\.com$ {
169 }
170 realm /^anonymous$ {
171         replymessage "No Access"
172 #       AccountingResponse On
173 }
174 # The realm below is equivalent to /.*
175 realm * {
176         server radius.example.com
177 }
178 # If you don't have a default server you probably want to
179 # reject all unknowns. Optionally you can also include a message
180 #realm * {
181 #        replymessage "User unknown"
182 #}