First Commit
[librecmc/package-feed.git] / net / ocserv / files / ocserv.conf.template
1 # User authentication method. Could be set multiple times and in that case
2 # all should succeed.
3 # Options: certificate, pam. 
4 #auth = "certificate"
5 #auth = "pam"
6
7 # The gid-min option is used by auto-select-group option, in order to
8 # select the minimum group ID.
9 #auth = "pam[gid-min=1000]"
10
11 # The plain option requires specifying a password file which contains
12 # entries of the following format.
13 # "username:groupname:encoded-password"
14 # One entry must be listed per line, and 'ocpasswd' can be used
15 # to generate password entries.
16 auth = "|AUTH|"
17
18 # A banner to be displayed on clients
19 banner = "Welcome to OpenWRT"
20
21 #isolate-workers = true
22
23 # When the server has a dynamic DNS address (that may change),
24 # should set that to true to ask the client to resolve again on
25 # reconnects.
26 listen-host-is-dyndns = |DYNDNS|
27
28 # Use listen-host to limit to specific IPs or to the IPs of a provided 
29 # hostname.
30 #listen-host = [IP|HOSTNAME]
31
32 # Limit the number of clients. Unset or set to zero for unlimited.
33 #max-clients = 1024
34 max-clients = |MAX_CLIENTS|
35
36 # Limit the number of client connections to one every X milliseconds 
37 # (X is the provided value). Set to zero for no limit.
38 rate-limit-ms = 100
39
40 # Limit the number of identical clients (i.e., users connecting 
41 # multiple times). Unset or set to zero for unlimited.
42 max-same-clients = |MAX_SAME|
43
44 # TCP and UDP port number
45 tcp-port = |PORT|
46 |UDP|udp-port = |PORT|
47
48 # Stats report time. The number of seconds after which each
49 # worker process will report its usage statistics (number of
50 # bytes transferred etc). This is useful when accounting like
51 # radius is in use.
52 #stats-report-time = 360
53
54 # Keepalive in seconds
55 keepalive = 32400
56
57 # Dead peer detection in seconds.
58 dpd = |DPD|
59
60 # Dead peer detection for mobile clients. The needs to
61 # be much higher to prevent such clients being awaken too 
62 # often by the DPD messages, and save battery.
63 # (clients that send the X-AnyConnect-Identifier-DeviceType)
64 mobile-dpd = 1800
65
66 # If using DTLS, and no UDP traffic is received for this
67 # many seconds, attempt to send future traffic over the TCP
68 # connection instead, in an attempt to wake up the client
69 # in the case that there is a NAT and the UDP translation
70 # was deleted. If this is unset, do not attempt to use this
71 # recovery mechanism.
72 switch-to-tcp-timeout = 25
73
74 # MTU discovery (DPD must be enabled)
75 try-mtu-discovery = false
76
77 # The key and the certificates of the server
78 # The key may be a file, or any URL supported by GnuTLS (e.g., 
79 # tpmkey:uuid=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx;storage=user
80 # or pkcs11:object=my-vpn-key;object-type=private)
81 #
82 # There may be multiple certificate and key pairs and each key
83 # should correspond to the preceding certificate.
84 server-cert = /etc/ocserv/server-cert.pem
85 server-key = /etc/ocserv/server-key.pem
86
87 # Diffie-Hellman parameters. Only needed if you require support
88 # for the DHE ciphersuites (by default this server supports ECDHE).
89 # Can be generated using:
90 # certtool --generate-dh-params --outfile /path/to/dh.pem
91 #dh-params = /path/to/dh.pem
92
93 # If you have a certificate from a CA that provides an OCSP
94 # service you may provide a fresh OCSP status response within
95 # the TLS handshake. That will prevent the client from connecting
96 # independently on the OCSP server.
97 # You can update this response periodically using:
98 # ocsptool --ask --load-cert=your_cert --load-issuer=your_ca --outfile response
99 # Make sure that you replace the following file in an atomic way.
100 #ocsp-response = /path/to/ocsp.der
101
102 # In case PKCS #11 or TPM keys are used the PINs should be available
103 # in files. The srk-pin-file is applicable to TPM keys only, and is the 
104 # storage root key.
105 #pin-file = /path/to/pin.txt
106 #srk-pin-file = /path/to/srkpin.txt
107
108 # The Certificate Authority that will be used to verify
109 # client certificates (public keys) if certificate authentication
110 # is set.
111 #ca-cert = /etc/ocserv/ca.pem
112
113 # The object identifier that will be used to read the user ID in the client 
114 # certificate. The object identifier should be part of the certificate's DN
115 # Useful OIDs are: 
116 #  CN = 2.5.4.3, UID = 0.9.2342.19200300.100.1.1
117 #cert-user-oid = 0.9.2342.19200300.100.1.1
118
119 # The object identifier that will be used to read the user group in the 
120 # client  certificate. The object identifier should be part of the certificate's
121 # DN. Useful OIDs are: 
122 #  OU (organizational unit) = 2.5.4.11 
123 #cert-group-oid = 2.5.4.11
124
125 # The revocation list of the certificates issued by the 'ca-cert' above.
126 #crl = /etc/ocserv/crl.pem
127
128 # Uncomment this to enable compression negotiation (LZS, LZ4).
129 |COMPRESSION|compression = true
130
131 # GnuTLS priority string
132 tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0"
133
134 # To enforce perfect forward secrecy (PFS) on the main channel.
135 #tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0:-RSA"
136
137 # The time (in seconds) that a client is allowed to stay connected prior
138 # to authentication
139 auth-timeout = 40
140
141 # The time (in seconds) that a client is allowed to stay idle (no traffic)
142 # before being disconnected. Unset to disable.
143 #idle-timeout = 1200
144
145 # The time (in seconds) that a mobile client is allowed to stay idle (no
146 # traffic) before being disconnected. Unset to disable.
147 #mobile-idle-timeout = 2400
148
149 # The time (in seconds) that a client is not allowed to reconnect after 
150 # a failed authentication attempt.
151 min-reauth-time = 360
152
153 # Banning clients in ocserv works with a point system. IP addresses
154 # that get a score over that configured number are banned for
155 # min-reauth-time seconds. By default a wrong password attempt is 10 points,
156 # a KKDCP POST is 1 point, and a connection is 1 point. Note that
157 # due to difference processes being involved the count of points
158 # will not be real-time precise.
159 #
160 # Score banning cannot be reliably used when receiving proxied connections
161 # locally from an HTTP server (i.e., when listen-clear-file is used).
162 #
163 # Set to zero to disable.
164 max-ban-score = 50
165
166 # The time (in seconds) that all score kept for a client is reset.
167 ban-reset-time = 300
168
169 # In case you'd like to change the default points.
170 #ban-points-wrong-password = 10
171 #ban-points-connection = 1
172 #ban-points-kkdcp = 1
173
174 # Cookie timeout (in seconds)
175 # which he can reconnect. That cookie will be invalided if not
176 # used within this timeout value. On a user disconnection, that
177 # cookie will also be active for this time amount prior to be
178 # invalid. That should allow a reasonable amount of time for roaming
179 # between different networks.
180 cookie-timeout = 300
181
182 # Whether roaming is allowed, i.e., if true a cookie is
183 # restricted to a single IP address and cannot be re-used
184 # from a different IP.
185 deny-roaming = false
186
187 # ReKey time (in seconds)
188 # ocserv will ask the client to refresh keys periodically once
189 # this amount of seconds is elapsed. Set to zero to disable.
190 rekey-time = 172800
191
192 # ReKey method
193 # Valid options: ssl, new-tunnel
194 #  ssl: Will perform an efficient rehandshake on the channel allowing
195 #       a seamless connection during rekey.
196 #  new-tunnel: Will instruct the client to discard and re-establish the channel.
197 #       Use this option only if the connecting clients have issues with the ssl
198 #       option.
199 rekey-method = ssl
200
201 # Script to call when a client connects and obtains an IP
202 # Parameters are passed on the environment.
203 # REASON, USERNAME, GROUPNAME, HOSTNAME (the hostname selected by client), 
204 # DEVICE, IP_REAL (the real IP of the client), IP_LOCAL (the local IP
205 # in the P-t-P connection), IP_REMOTE (the VPN IP of the client),
206 # ID (a unique numeric ID); REASON may be "connect" or "disconnect".
207
208 # These scripts are not needed if you have setup an interface for all vpns+
209 # devices.
210 #connect-script = /usr/bin/ocserv-script
211 #disconnect-script = /usr/bin/ocserv-script
212
213 # UTMP
214 use-utmp = false
215
216 # Whether to enable support for the occtl tool (i.e., either through D-BUS,
217 # or via a unix socket).
218 use-occtl = true
219
220 # socket file used for IPC with occtl. You only need to set that,
221 # if you use more than a single servers.
222 occtl-socket-file = /var/run/occtl.socket
223
224 # PID file. It can be overriden in the command line.
225 pid-file = /var/run/ocserv.pid
226
227 # The default server directory. Does not require any devices present.
228 chroot-dir = /var/lib/ocserv
229
230 # socket file used for IPC, will be appended with .PID
231 # It must be accessible within the chroot environment (if any)
232 #socket-file = /var/run/ocserv-socket
233 socket-file = ocserv-socket
234
235 # The user the worker processes will be run as. It should be
236 # unique (no other services run as this user).
237 run-as-user = ocserv
238 run-as-group = ocserv
239
240 # Set the protocol-defined priority (SO_PRIORITY) for packets to
241 # be sent. That is a number from 0 to 6 with 0 being the lowest
242 # priority. Alternatively this can be used to set the IP Type-
243 # Of-Service, by setting it to a hexadecimal number (e.g., 0x20).
244 # This can be set per user/group or globally.
245 #net-priority = 3
246
247 # Set the VPN worker process into a specific cgroup. This is Linux
248 # specific and can be set per user/group or globally.
249 #cgroup = "cpuset,cpu:test"
250
251 #
252 # Network settings
253 #
254
255 # The name of the tun device
256 device = vpns
257
258 # Whether the generated IPs will be predictable, i.e., IP stays the
259 # same for the same user when possible.
260 predictable-ips = |PREDICTABLE_IPS|
261
262 # The default domain to be advertised
263 |ENABLE_DEFAULT_DOMAIN|default-domain = |DEFAULT_DOMAIN|
264
265 # The pool of addresses that leases will be given from.
266 ipv4-network = |IPV4ADDR|
267 ipv4-netmask = |NETMASK|
268
269 # The advertized DNS server. Use multiple lines for
270 # multiple servers.
271 # dns = fc00::4be0
272 #dns = 192.168.1.2
273
274 # The NBNS server (if any)
275 #nbns = 192.168.1.3
276
277 # The IPv6 subnet that leases will be given from.
278 |ENABLE_IPV6|ipv6-network = |IPV6ADDR|
279
280 # The domains over which the provided DNS should be used. Use
281 # multiple lines for multiple domains.
282 |ENABLE_SPLIT_DNS|split-dns = |DEFAULT_DOMAIN|
283
284 # Prior to leasing any IP from the pool ping it to verify that
285 # it is not in use by another (unrelated to this server) host.
286 ping-leases = |PING_LEASES|
287
288 # Unset to assign the default MTU of the device
289 # mtu = 
290
291 # Unset to enable bandwidth restrictions (in bytes/sec). The
292 # setting here is global, but can also be set per user or per group.
293 #rx-data-per-sec = 40000
294 #tx-data-per-sec = 40000
295
296 # The number of packets (of MTU size) that are available in
297 # the output buffer. The default is low to improve latency.
298 # Setting it higher will improve throughput.
299 #output-buffer = 10
300
301 # Routes to be forwarded to the client. If you need the
302 # client to forward routes to the server, you may use the 
303 # config-per-user/group or even connect and disconnect scripts.
304 #
305 # To set the server as the default gateway for the client just
306 # comment out all routes from the server.
307 #route = 192.168.1.0/255.255.255.0
308 #route = 192.168.5.0/255.255.255.0
309 #route = fef4:db8:1000:1001::/64
310
311 # Configuration files that will be applied per user connection or
312 # per group. Each file name on these directories must match the username
313 # or the groupname.
314 # The options allowed in the configuration files are dns, nbns,
315 #  ipv?-network, ipv4-netmask, ipv6-prefix, rx/tx-per-sec, iroute, route,
316 #  net-priority and cgroup.
317 #
318 # Note that the 'iroute' option allows to add routes on the server
319 # based on a user or group. The syntax depends on the input accepted
320 # by the commands route-add-cmd and route-del-cmd (see below).
321
322 config-per-user = /etc/ocserv/config-per-user/
323 config-per-group = /etc/ocserv/config-per-group/
324
325 # When config-per-xxx is specified and there is no group or user that
326 # matches, then utilize the following configuration.
327
328 #default-user-config = /etc/ocserv/defaults/user.conf
329 #default-group-config = /etc/ocserv/defaults/group.conf
330
331 # Groups that a client is allowed to select from.
332 # A client may belong in multiple groups, and in certain use-cases
333 # it is needed to switch between them. For these cases the client can
334 # select prior to authentication. Add multiple entries for multiple groups.
335 #select-group = group1
336 #select-group = group2[My group 2]
337 #select-group = tost[The tost group]
338
339 # The name of the group that if selected it would allow to use
340 # the assigned by default group.
341 #default-select-group = DEFAULT
342
343 # Instead of specifying manually all the allowed groups, you may instruct
344 # ocserv to scan all available groups and include the full list. That
345 # option is only functional on plain authentication.
346 #auto-select-group = true
347
348 # The system command to use to setup a route. %{R} will be replaced with the
349 # route/mask and %{D} with the (tun) device.
350 #
351 # The following example is from linux systems. %{R} should be something
352 # like 192.168.2.0/24
353
354 #route-add-cmd = "/usr/sbin/ip route add %{R} dev %{D}"
355 #route-del-cmd = "/usr/sbin/ip route delete %{R} dev %{D}"
356
357 route-add-cmd = "/sbin/route add -net %{RI} dev %{D}"
358 route-del-cmd = "/sbin/route del -net %{RI} dev %{D}"
359
360 # This option allows to forward a proxy. The special strings '%{U}'
361 # and '%{G}', if present will be replaced by the username and group name.
362 #proxy-url = http://example.com/
363 #proxy-url = http://example.com/%{U}/%{G}/hello
364
365 #
366 # The following options are for (experimental) AnyConnect client 
367 # compatibility. 
368
369 # Client profile xml. A sample file exists in doc/profile.xml.
370 # This file must be accessible from inside the worker's chroot. 
371 # It is not used by the openconnect client.
372 #user-profile = profile.xml
373
374 # Binary files that may be downloaded by the CISCO client. Must
375 # be within any chroot environment.
376 #binary-files = /path/to/binaries
377
378 # Unless set to false it is required for clients to present their
379 # certificate even if they are authenticating via a previously granted
380 # cookie and complete their authentication in the same TCP connection.
381 # Legacy CISCO clients do not do that, and thus this option should be 
382 # set for them.
383 cisco-client-compat = |CISCO_COMPAT|
384
385 #Advanced options
386
387 # Option to allow sending arbitrary custom headers to the client after
388 # authentication and prior to VPN tunnel establishment.
389 #custom-header = "X-My-Header: hi there"
390
391 expose-iroutes = true