radsecproxy.conf-example 8.1 KB
Newer Older
venaas's avatar
venaas committed
1
# Master config file, must be in /etc/radsecproxy or specified with -c option
venaas's avatar
venaas committed
2
#	All possible config options are listed below
venaas's avatar
venaas committed
3

venaas's avatar
venaas committed
4 5
# First you may define any global options, these are:
#
venaas's avatar
venaas committed
6
# You can optionally specify addresses and ports to listen on
venaas's avatar
venaas committed
7
# Multiple statements can be used for multiple ports/addresses
venaas's avatar
venaas committed
8
#ListenUDP		*:1814
Linus Nordberg's avatar
Linus Nordberg committed
9
#ListenUDP		localhost
venaas's avatar
venaas committed
10
#ListenTCP		[2001:700:1:7:215:f2ff:fe35:307d]:1812
Linus Nordberg's avatar
Linus Nordberg committed
11
#ListenTLS		10.10.10.10:2084
venaas's avatar
venaas committed
12 13
#ListenTLS		[2001:700:1:7:215:f2ff:fe35:307d]:2084
#ListenDTLS		[2001:700:1:7:215:f2ff:fe35:307d]:2084
venaas's avatar
venaas committed
14 15 16

# To specify a certain address/port for UDP/TLS requests you can use e.g.
#SourceUDP		127.0.0.1:33000
venaas's avatar
venaas committed
17 18 19
#SourceTCP		*:33000
#SourceTLS		*:33001
#SourceDTLS		*:33001
20

21
# Optional log level. 3 is default, 1 is less, 5 is more
venaas's avatar
venaas committed
22
#LogLevel		3
23
# Optional LogDestination, else stderr used for logging
venaas's avatar
venaas committed
24
# Logging to file
25
#LogDestination		file:///tmp/rp.log
venaas's avatar
venaas committed
26 27 28
# Or logging with Syslog. LOG_DAEMON used if facility not specified
# The supported facilities are LOG_DAEMON, LOG_MAIL, LOG_USER and
# LOG_LOCAL0, ..., LOG_LOCAL7
29 30
#LogDestination         x-syslog:///
#LogDestination         x-syslog:///log_local2
venaas's avatar
venaas committed
31

32
# For generating log entries conforming to the F-Ticks system, specify
33
# FTicksReporting with one of the following values.
34 35 36
#   None  -- Do not log in F-Ticks format.  This is the default.
#   Basic -- Do log in F-Ticks format but do not log VISINST.
#   Full  -- Do log in F-Ticks format and do log VISINST.
37 38 39
# Please note that in order to get F-Ticks logging for a given client,
# its matching client configuration block has to contain the
# fticksVISCOUNTRY option.
40

41
# You can optionally specify FTicksMAC in order to determine if and
42
# how Calling-Station-Id (users Ethernet MAC address) is being logged.
43
#   Static          -- Use a static string as a placeholder for
44
#                      Calling-Station-Id.
45 46
#   Original        -- Log Calling-Station-Id as-is.
#   VendorHashed    -- Keep first three segments as-is, hash the rest.
47 48
#   VendorKeyHashed -- Like VendorHashed but salt with F-Ticks-Key.    This
#   		       is the default.
49 50 51
#   FullyHashed     -- Hash the entire string.
#   FullyKeyHashed  -- Like FullyHashed but salt with F-Ticks-Key.

52 53 54
# In order to use FTicksMAC with one of VendorKeyHashed or
# FullyKeyHashed, specify a key with FTicksKey.
# FTicksKey <key>
55 56

# Default F-Ticks configuration:
57
#FTicksReporting None
58
#FTicksMAC Static
59

60
# You can optionally specify FTicksSyslogFacility to use a dedicated 
61
# syslog facility for F-Ticks messages. This allows for easier filtering
62
# of F-Ticks messages.
63 64
# F-Ticks messages are always logged using the log level LOG_DEBUG.
# Note that specifying a file (using the file:/// prefix) is not supported.
65 66 67
#FTicksSyslogFacility	log_local1
#FTicksSyslogFacility	x-syslog:///log_local1 

68 69 70
# There is an option for doing some simple loop prevention.  Note that
# the LoopPrevention directive can be used in server blocks too,
# overriding what's set here in the basic settings.
venaas's avatar
venaas committed
71
#LoopPrevention		on
venaas's avatar
venaas committed
72
# Add TTL attribute with value 20 if not present (prevents endless loops)
Linus Nordberg's avatar
Linus Nordberg committed
73
#AddTTL 20
venaas's avatar
venaas committed
74

venaas's avatar
venaas committed
75 76 77 78 79 80 81
# If we have TLS clients or servers we must define at least one tls block.
# You can name them whatever you like and then reference them by name when
# specifying clients or servers later. There are however three special names
# "default", "defaultclient" and "defaultserver". If no name is defined for
# a client, the "defaultclient" block will be used if it exists, if not the
# "default" will be used. For a server, "defaultserver" followed by "default"
# will be checked.
venaas's avatar
venaas committed
82
#
venaas's avatar
venaas committed
83
# The simplest configuration you can do is:
venaas's avatar
venaas committed
84 85 86 87 88 89 90 91 92 93 94
tls default {
    # You must specify at least one of CACertificateFile or CACertificatePath
    # for TLS to work. We always verify peer certificate (client and server)
    # CACertificateFile    /etc/cacerts/CA.pem
    CACertificatePath	/etc/cacerts

    # You must specify the below for TLS, we always present our certificate
    CertificateFile	/etc/hostcertkey/host.example.com.pem
    CertificateKeyFile	/etc/hostcertkey/host.example.com.key.pem
    # Optionally specify password if key is encrypted (not very secure)
    CertificateKeyPassword	"follow the white rabbit"
venaas's avatar
venaas committed
95 96
    # Optionally enable CRL checking
    # CRLCheck on
venaas's avatar
venaas committed
97 98
    # Optionally specify how long CAs and CRLs are cached, default forever
    # CacheExpiry 3600
venaas's avatar
venaas committed
99 100 101
    # Optionally require that peer certs have one of the specified policyOIDs
    # policyoid     1.2.3 # this option can be used multiple times
    # policyoid     1.3.4
venaas's avatar
venaas committed
102 103
}

venaas's avatar
venaas committed
104 105 106 107 108
# If you want one cert for all clients and another for all servers, use
# defaultclient and defaultserver instead of default. If we wanted some
# particular server to use something else you could specify a block
# "tls myserver" and then reference that for that server. If you always
# name the tls block in the client/server config you don't need a default
venaas's avatar
venaas committed
109

venaas's avatar
venaas committed
110 111 112
# Now we configure clients, servers and realms. Note that these and
# also the lines above may be in any order, except that a realm
# can only be configured to use a server that is previously configured.
venaas's avatar
venaas committed
113

venaas's avatar
venaas committed
114 115 116 117 118 119 120 121
# A realm can be a literal domain name, * which matches all, or a
# regexp. A regexp is specified by the character prefix /
# For regexp we do case insensitive matching of the entire username string.
# The matching of realms is done in the order they are specified, using the
# first match found. Some examples are
# "@example\.com$", "\.com$", ".*" and "^[a-z].*@example\.com$".
# To treat local users separately you might try first specifying "@"
# and after that "*".
122

venaas's avatar
venaas committed
123 124
# Configure a rewrite block if you want to add/remove/modify attributes
# rewrite example {
125
#       # Remove NAS-Port.
venaas's avatar
venaas committed
126
#	removeAttribute 5
127
#       # Remove vendor attribute 100.
venaas's avatar
venaas committed
128
#	removeVendorAttribute 99:100
129 130 131 132 133
#       # Called-Station-Id = "123456"
#	addAttribute 30:123456
#       # Vendor-99-Attr-101 = 0x0f
#       addVendorAttribute 99:101:%0f
#       # Change users @local to @example.com.
134
#	modifyAttribute 1:/^(.*)@local$/\1@example.com/
venaas's avatar
venaas committed
135 136
# }

137
client [2001:db8::1] {
venaas's avatar
venaas committed
138 139
	type	tls
	secret	verysecret
venaas's avatar
venaas committed
140
# we could specify tls here, e.g.
venaas's avatar
venaas committed
141
#	tls myclient
venaas's avatar
venaas committed
142 143 144
# in order to use tls parameters named myclient. We don't, so we will
# use "tls defaultclient" if defined, or look for "tls default" as a
# last resort
venaas's avatar
venaas committed
145 146 147 148
}
client 127.0.0.1 {
	type	udp
	secret	secret
venaas's avatar
venaas committed
149 150 151 152 153 154 155 156
#	Might do rewriting of incoming messages using rewrite block example
#	rewriteIn example
#	Can also do rewriting of outgoing messages
#	rewriteOut example	
}
client 127.0.0.1 {
	type	tcp
	secret	secret
venaas's avatar
venaas committed
157 158
}
client radius.example.com {
venaas's avatar
venaas committed
159
	type tls
venaas's avatar
venaas committed
160 161
# secret is optional for TLS
}
venaas's avatar
venaas committed
162 163 164 165
client radius.example.com {
	type dtls
# secret is optional for DTLS
}
venaas's avatar
venaas committed
166 167 168 169

server 127.0.0.1 {
	type	UDP
	secret	secret
venaas's avatar
venaas committed
170 171 172 173
#	Might do rewriting of incoming messages using rewrite block example
#	rewriteIn example
#	Can also do rewriting of outgoing messages
#	rewriteOut example	
174 175
#       Might override loop prevention here too:
#       LoopPrevention off
venaas's avatar
venaas committed
176
}
177
realm	eduroam.cc {
venaas's avatar
venaas committed
178
	server	127.0.0.1
venaas's avatar
venaas committed
179 180
# If also want to use this server for accounting, specify
#	accountingServer 127.0.0.1
venaas's avatar
venaas committed
181 182
}

183
server [2001:db8::1] {
venaas's avatar
venaas committed
184 185 186
	type	TLS
	port	2283
# secret is optional for TLS
venaas's avatar
venaas committed
187
# we could specify tls here, e.g.
venaas's avatar
venaas committed
188
#	tls myserver
venaas's avatar
venaas committed
189 190 191
# in order to use tls parameters named myserver. We don't, so we will
# use "tls defaultserver" if defined, or look for "tls default" as a
# last resort
venaas's avatar
venaas committed
192 193 194 195
}
server radius.example.com {
	type	tls
	secret	verysecret
venaas's avatar
venaas committed
196 197
	StatusServer on
# statusserver is optional, can be on or off. Off is default
venaas's avatar
venaas committed
198
}
venaas's avatar
venaas committed
199 200 201 202 203 204
#server radius.example.com {
#	type	dtls
#	secret	verysecret
#	StatusServer on
## statusserver is optional, can be on or off. Off is default
#}
venaas's avatar
venaas committed
205

206 207
# Equivalent to example.com
realm /@example\.com$ {
venaas's avatar
venaas committed
208 209
	server 2001:db8::1
}
venaas's avatar
venaas committed
210 211
# One can define a realm without servers, the proxy will then reject
# and requests matching this. Optionally one can specify ReplyMessage
venaas's avatar
venaas committed
212 213
# attribute to be included in the reject message. One can also use
# AccountingResponse option to specify that the proxy should send such.
214
realm /\.com$ {
venaas's avatar
venaas committed
215 216 217
}
realm /^anonymous$ {
        replymessage "No Access"
venaas's avatar
venaas committed
218
#	AccountingResponse On
venaas's avatar
venaas committed
219
}
220 221
# The realm below is equivalent to /.*
realm * {
venaas's avatar
venaas committed
222 223
	server radius.example.com
}
venaas's avatar
venaas committed
224 225
# If you don't have a default server you probably want to
# reject all unknowns. Optionally you can also include a message
venaas's avatar
venaas committed
226
#realm * {
venaas's avatar
venaas committed
227 228
#        replymessage "User unknown"
#}