updates to readme/changelog etc
[radsecproxy.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 #       Max one of each, below are just multiple examples
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 # To listen to the default or other Accounting port for UDP you need e.g.
15 #ListenAccountingUDP    *:1813
16
17 # To specify a certain address/port for UDP/TLS requests you can use e.g.
18 #SourceUDP              127.0.0.1:33000
19 #SourceTCP              *:33000
20 #SourceTLS              *:33001
21 #SourceDTLS             *:33001
22 # Optional log level. 3 is default, 1 is less, 4 is more
23 #LogLevel               3
24 #Optional LogDestinatinon, else stderr used for logging
25 # Logging to file
26 #LogDestination         file:///tmp/rp.log
27 # Or logging with Syslog. LOG_DAEMON used if facility not specified
28 # The supported facilities are LOG_DAEMON, LOG_MAIL, LOG_USER and
29 # LOG_LOCAL0, ..., LOG_LOCAL7
30 #LogDestination         x-syslog:///
31 #LogDestination         x-syslog:///log_local2
32
33 #There is an option for doing some simple loop prevention
34 #LoopPrevention         on
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 }
61
62 #If you want one cert for all clients and another for all servers, use
63 #defaultclient and defaultserver instead of default. If we wanted some
64 #particular server to use something else you could specify a block
65 #"tls myserver" and then reference that for that server. If you always
66 #name the tls block in the client/server config you don't need a default
67
68 #Now we configure clients, servers and realms. Note that these and
69 #also the lines above may be in any order, except that a realm
70 #can only be configured to use a server that is previously configured.
71
72 #A realm can be a literal domain name, * which matches all, or a
73 #regexp. A regexp is specified by the character prefix /
74 #For regexp we do case insensitive matching of the entire username string.
75 #The matching of realms is done in the order they are specified, using the
76 #first match found. Some examples are
77 #"@example\.com$", "\.com$", ".*" and "^[a-z].*@example\.com$".
78 #To treat local users separately you might try first specifying "@"
79 #and after that "*".
80
81 # Configure a rewrite block if you want to add/remove/modify attributes
82 # rewrite example {
83 #       removeAttribute 5
84 #       removeVendorAttribute 99:100
85 #       addAttribute 4 attribute%20value
86 #       modifyAttribute 1:/^(.*)@local$/$1@example.com/
87 # }
88
89 client 2001:db8::1 {
90         type    tls
91         secret  verysecret
92 #we could specify tls here, e.g.
93 #       tls myclient
94 #in order to use tls parameters named myclient. We don't, so we will
95 #use "tls defaultclient" if defined, or look for "tls default" as a
96 #last resort
97 }
98 client 127.0.0.1 {
99         type    udp
100         secret  secret
101 #       Might do rewriting of incoming messages using rewrite block example
102 #       rewriteIn example
103 #       Can also do rewriting of outgoing messages
104 #       rewriteOut example      
105 }
106 client 127.0.0.1 {
107         type    tcp
108         secret  secret
109 }
110 client radius.example.com {
111         type tls
112 # secret is optional for TLS
113 }
114 client radius.example.com {
115         type dtls
116 # secret is optional for DTLS
117 }
118
119 server 127.0.0.1 {
120         type    UDP
121         secret  secret
122 #       Might do rewriting of incoming messages using rewrite block example
123 #       rewriteIn example
124 #       Can also do rewriting of outgoing messages
125 #       rewriteOut example      
126 }
127 realm   eduroam.cc {
128         server  127.0.0.1
129 # If also want to use this server for accounting, specify
130 #       accountingServer 127.0.0.1
131 }
132
133 server 2001:db8::1 {
134         type    TLS
135         port    2283
136 # secret is optional for TLS
137 #we could specify tls here, e.g.
138 #       tls myserver
139 #in order to use tls parameters named myserver. We don't, so we will
140 #use "tls defaultserver" if defined, or look for "tls default" as a
141 #last resort
142 }
143 server radius.example.com {
144         type    tls
145         secret  verysecret
146         StatusServer on
147 # statusserver is optional, can be on or off. Off is default
148 }
149 #server radius.example.com {
150 #       type    dtls
151 #       secret  verysecret
152 #       StatusServer on
153 ## statusserver is optional, can be on or off. Off is default
154 #}
155
156 # Equivalent to example.com
157 realm /@example\.com$ {
158         server 2001:db8::1
159 }
160 # One can define a realm without servers, the proxy will then reject
161 # and requests matching this. Optionally one can specify ReplyMessage
162 # attribute to be included in the reject message. One can also use
163 # AccountingResponse option to specify that the proxy should send such.
164 realm /\.com$ {
165 }
166 realm /^anonymous$ {
167         replymessage "No Access"
168 #       AccountingResponse On
169 }
170 # The realm below is equivalent to /.*
171 realm * {
172         server radius.example.com
173 }
174 #If you don't have a default server you probably want to
175 #reject all unknowns. Optionally you can also include a message
176 #realm * {
177 #        replymessage "User unknown"
178 #}