completely changed TLS configuration
[radsecproxy.git] / radsecproxy.conf-example
1 #Master config file, must be in /etc/radsecproxy or proxy's current directory
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              10.10.10.10:2084
11 #ListenTCP              [2001:700:1:7:215:f2ff:fe35:307d]:2084
12 # Optional log level. 3 is default, 1 is less, 4 is more
13 #LogLevel               3
14 #Optional LogDestinatinon, else stderr used for logging
15 # Logging to file
16 #LogDestination         file:///tmp/rp.log
17 # Or logging with Syslog. LOG_DAEMON used if facility not specified
18 # The supported facilities are LOG_DAEMON, LOG_MAIL, LOG_USER and
19 # LOG_LOCAL0, ..., LOG_LOCAL7
20 #LogDestination         x-syslog://
21 #LogDestination         x-syslog://log_local2
22
23 #If we have TLS clients or servers we must define at least one tls block.
24 #You can name them whatever you like and then reference them by name when
25 #specifying clients or servers later. There are however three special names
26 #"default", "defaultclient" and "defaultserver". If no name is defined for
27 #a client, the "defaultclient" block will be used if it exists, if not the
28 #"default" will be used. For a server, "defaultserver" followed by "default"
29 #will be checked.
30 #
31 #The simplest configuration you can do is:
32 tls default {
33     # You must specify at least one of CACertificateFile or CACertificatePath
34     # for TLS to work. We always verify peer certificate (client and server)
35     # CACertificateFile    /etc/cacerts/CA.pem
36     CACertificatePath   /etc/cacerts
37
38     # You must specify the below for TLS, we always present our certificate
39     CertificateFile     /etc/hostcertkey/host.example.com.pem
40     CertificateKeyFile  /etc/hostcertkey/host.example.com.key.pem
41     # Optionally specify password if key is encrypted (not very secure)
42     CertificateKeyPassword      "follow the white rabbit"
43 }
44
45 #If you want one cert for all clients and another for all servers, use
46 #defaultclient and defaultserver instead of default. If we wanted some
47 #particular server to use something else you could specify a block
48 #"tls myserver" and then reference that for that server. If you always
49 #name the tls block in the client/server config you don't need a default
50
51 #Now we configure clients, servers and realms. Note that these and
52 #also the lines above may be in any order, except that a realm
53 #can only be configured to use a server that is previously configured.
54
55 #A realm can be a literal domain name, * which matches all, or a
56 #regexp. A regexp is specified by the character prefix /
57 #For regexp we do case insensitive matching of the entire username string.
58 #The matching of realms is done in the order they are specified, using the
59 #first match found. Some examples are
60 #"@example\.com$", "\.com$", ".*" and "^[a-z].*@example\.com$".
61 #To treat local users separately you might try first specifying "@"
62 #and after that "*".
63
64 client 2001:db8::1 {
65         type    tls
66         secret  verysecret
67 #we could specify tls here, e.g.
68 #       tls myclient
69 #in order to use tls parameters named myclient. We don't, so we will
70 #use "tls defaultclient" if defined, or look for "tls default" as a
71 #last resort
72 }
73 client 127.0.0.1 {
74         type    udp
75         secret  secret
76 }
77 client radius.example.com {
78         type TLS
79 # secret is optional for TLS
80 }
81
82 server 127.0.0.1 {
83         type    UDP
84         secret  secret
85 }
86 realm   eduroam.cc {
87         server  127.0.0.1
88 }
89
90 server 2001:db8::1 {
91         type    TLS
92         port    2283
93 # secret is optional for TLS
94 #we could specify tls here, e.g.
95 #       tls myserver
96 #in order to use tls parameters named myserver. We don't, so we will
97 #use "tls defaultserver" if defined, or look for "tls default" as a
98 #last resort
99 }
100 server radius.example.com {
101         type    tls
102         secret  verysecret
103         StatusServer on
104 # statusserver is optional, can be on or off. Off is default
105 }
106
107 # Equivalent to example.com
108 realm /@example\.com$ {
109         server 2001:db8::1
110 }
111 # One can define a realm without servers, the proxy will then reject
112 # and requests matching this. Optionally one can specify ReplyMessage
113 # attribute to be included in the reject message.
114
115 realm /\.com$ {
116 }
117 realm /^anonymous$ {
118         replymessage "No Access"
119 }
120 # The realm below is equivalent to /.*
121 realm * {
122         server radius.example.com
123 }
124 #If you don't have a default server you probably want to
125 #reject all unknowns. Optionally you can also include a message
126 #realm * {
127         replymessage "User unknown"
128 }