updates
[silc.git] / doc / example_silcd.conf.in
1 #
2 # silcd.conf
3 #
4 # Example configuration file.  Note that this attempts to present various
5 # configuration possibilities and may not actually give any sensible
6 # configuration.  For real life example see the examples/ directory.
7 #
8 # Most of the settings in this file are optional.  If some setting is
9 # mandatory it is mentioned separately.  If some setting is omitted it means
10 # that its builtin default value will be used.  Boolean values, that is
11 # setting something on or off, is done by setting either "true" or "false"
12 # value, respectively.
13 #
14 # The ServerInfo section is mandatory section.  Other sections are optional.
15 # However, if General section is defined it must be defined before the
16 # ConnectionParams sections.  On the other hand, the ConnectionParams section
17 # must be defined before Client, ServerConnection or RouterConnection 
18 # sections.  Other sections can be in free order.
19 #
20
21 #
22 # Include global algorithms from the "silcalgs.conf" file. This file
23 # defines ciphers, hash functions, HMACs and PKCS algorithms that can
24 # be used.
25 #
26 Include "@ETCDIR@/silcalgs.conf";
27
28 #
29 # General configuration options
30 #
31 # These defines the default behaviour of the server.  Most of these values
32 # can be overridden with ConnectionParams, which can be defined independently
33 # for different connections.
34 #
35 General {
36         # This is the default path where to search modules.  If omitted
37         # built-in modules will be used.  Built-in modules will also be
38         # used if a module file cannot be located.
39         module_path = "@MODULESDIR@";
40
41         # If both passphrase and public key authentication is set for a
42         # connection the public key authentication is the preferred one
43         # to use.  Set this to `true' to prefer passphrase authentication
44         # over public key authentication in these cases.
45         #prefer_passphrase_auth = true;
46
47         # Set this to true if the server should require fully qualified
48         # domain names (FQDN) for incoming connections. If true, a host
49         # without FQDN cannot connect to the server.
50         #require_reverse_lookup = true;
51
52         # Maximum number of incoming connections allowed to this server.
53         # If more attempt to connect they will be refused.
54         connections_max = 1000;
55
56         # Maximum number of incoming connections allowed per single host.
57         # For example, if this is one (1) it means a host can link only
58         # once to the server. Attempting to connect more than once would be
59         # refused. This can be overridden with ConnectionParams.
60         #connections_max_per_host = 10;
61
62         # Required version of the remote.  If these are specified then the
63         # remote must be of at least this version, or newer.  If older then
64         # the connection will not be allowed.
65         #
66         # version_protocol         - SILC protocol version ("major.minor")
67         # version_software         - software version ("major.minor")
68         # version_software_vendor  - vendor specific version extension
69         #
70         # The version_software_vendor may be for example a string or a build
71         # number of the software.  The string can be a regex string to match
72         # more widely.  Usually the vendor version checking is not necessary
73         # and can be omitted.  These can be overridden with ConnectionParams.
74         #version_protocol = "1.1";
75         #version_software = "1.3";
76         #version_software_vendor = "SomeVendor";
77
78         # Default keepalive frequency (seconds). This can be overridden
79         # with ConnectionParams.
80         keepalive_secs = 300;
81
82         # Default reconnection parameters defines how the server reconnect
83         # to the remote if the connection was lost.  The reconnection phase
84         # use so called exponential backoff algorithm;  The reconnect
85         # interval grows when reconnect count grows.  Next example will
86         # attempt to reconnect after 10 seconds of disconnect, and the
87         # interval grows up to 600 seconds or until 7 times was attempted
88         # to reconnect.  These settings has effect only when connecting
89         # as initiator.
90         #
91         # reconnect_count        - how many times reconnect is attempted
92         # reconnect_interval     - how often reconnect it performed (seconds)
93         # reconnect_interval_max - maximum interval for reconnect, the
94         #                          server never waits longer than this to
95         #                          reconnect (seconds).
96         # reconnect_keep_trying  - whether to keep trying even after 
97         #                          reconnect_count is reached (the interval
98         #                          will be reconnect_interval_max).
99         #
100         # These can be overridden with ConnectionParams.
101         reconnect_count = 7;
102         reconnect_interval = 10;
103         reconnect_interval_max = 600;
104         reconnect_keep_trying = true;
105
106         # Key exchange protocol rekey interval (seconds). How often to
107         # regenerate the session key with the remote. Initiator will perform
108         # the rekey and this setting affects only when connecting as initiator.
109         # This can be overridden with ConnectionParams.
110         #key_exchange_rekey = 3600;
111
112         # Key exchange with Perfect Forward Secrecy (PFS). This will perform
113         # the rekey process with PFS, making the new key more secure since it
114         # is not dependent in any way of the old key. This will make the rekey
115         # process somewhat slower, than without PFS.  This can be overridden
116         # with ConnectionParams.
117         #key_exchange_pfs = true;
118
119         # Key exchange timeout (seconds). If the key exchange protocol is not
120         # finished in this time period the remote connection will be closed.
121         #key_exchange_timeout = 60;
122
123         # Connection authentication timeout (seconds). If the connection
124         # authentication protocol is not finished in this time period the
125         # remote connection will be closed.
126         #conn_auth_timeout = 60;
127
128         # Channel key rekey interval (seconds). How often channel key is
129         # regenerated. Note that channel key is regenerated also always when
130         # someone joins or leaves the channel.
131         #channel_rekey_secs = 3600;
132
133         # SILC session detachment disabling and limiting.  By default clients
134         # can detach their sessions from server.  If you set detach_disabled
135         # to true the DETACH command cannot be used by clients.  If you
136         # want to limit for how long the server keeps detached sessions you
137         # can set the time (minutes) in detach_timeout.  After that timeout
138         # the detached session is closed if it is not resumed.  By default
139         # sessions are persistent as long as server is running.
140         #detach_disabled = true;
141         #detach_timeout = 1440;
142 };
143
144 #
145 # Server information
146 #
147 ServerInfo {
148         #
149         # Server name (FQDN)
150         #
151         hostname = "lassi.kuo.fi.ssh.com";
152
153         #
154         # Primary listener.  Specify the IP address and the port to bind
155         # the server.
156         #
157         Primary {
158                 ip = "10.2.1.6";
159                 port = 706;
160         };
161
162         #
163         # Secondary listener(s).  If you need to bind your server into
164         # several interfaces use the Secondary to specify the listener(s).
165         #
166         #Secondary { ip = "10.2.1.60"; port = 706; };
167         #Secondary { ip = "10.2.1.160"; port = 706; };
168
169         #
170         # ServerType field specifies the purpose of this server
171         # This is only a descriptive field.
172         #
173         ServerType = "Test Server";
174
175         #
176         # Geographic location
177         #
178         Location = "Kuopio, Finland";
179
180         #
181         # Full admin name
182         #
183         Admin = "Foo T. Bar";
184
185         #
186         # Admin's email address
187         #
188         AdminEmail = "foo-admin@bar.com";
189
190         #
191         # Run SILC server as specific user and group. The server must be 
192         # initially run as root.
193         #
194         User = "nobody";
195         Group = "nobody";
196
197         #
198         # Public and private keys
199         #
200         PublicKey = "@ETCDIR@/silcd.pub";
201         PrivateKey = "@ETCDIR@/silcd.prv";
202
203         #
204         # Motd file
205         #
206         # Specifies the text file displayed on client connection
207         #
208         #MotdFile = "@ETCDIR@/motd.txt";
209
210         #
211         # Pid file
212         #
213         PidFile = "@PIDFILE@";
214 };
215
216 #
217 # Log files.
218 #
219 # This section is used to set various logging files, their paths, maximum
220 # sizes and logging options.
221 #
222 # There are only four defined channels allowed for defining (see below).
223 # The log channels have an importance value, and most important channels
224 # are redirected on the less important ones, thus setting a valid logging
225 # file for "Info" will ensure logging for all channels, while setting
226 # logging file for "Errors" will ensure logging for channels "Errors"
227 # and "Fatals"
228 #
229 Logging {
230         # If QuickLogs is true, then the logging files will be updated
231         # real-time. This causes a bit more CPU and HDD activity, but
232         # reduces memory usage.  By default it is false and log files are
233         # written with FlushDelay timeout.
234         #
235         #QuickLogs = true;
236
237         # FlushDelay tells log files update delay (seconds) in case you 
238         # have chosen buffering output.  This setting has effect only if
239         # the QuickLogs is false.
240         #
241         FlushDelay = 180;
242
243         # Informational messages
244         Info {
245                 File = "@LOGSDIR@/silcd.log";
246                 Size = "50k";
247         };
248
249         # Warning messages
250         Warnings {
251                 File = "@LOGSDIR@/silcd_warnings.log";
252                 Size = "50k";
253         };
254
255         # Error messages
256         Errors {
257                 File = "@LOGSDIR@/silcd_errors.log";
258                 Size = "50k";
259         };
260
261         # Fatal messages
262         Fatals {
263                 File = "@LOGSDIR@/silcd_fatals.log";
264                 Size = "50k";
265         };
266 };
267
268 #
269 # Connection Parameters
270 #
271 # This section defined connection parameters.  It is possible to use
272 # specific parameters in different connections, and to define different
273 # parameters to different connections.  The parameters can define how the
274 # connection is handled and how the session is managed.  If connection
275 # parameters are not used in connections the default values will apply
276 # (or values defined in General section).  You can have multiple
277 # ConnectionParams blocks defined.
278 #
279 ConnectionParams {
280         # unique name. The name is used to reference to this parameter 
281         # block from the connections. This field is mandatory.
282         name = "normal";
283
284         # Maximum number of connections allowed. More connections will be
285         # refused. This can be used for example to limit number of clients.
286         # Note that this never can be larger than the connections_max
287         # specified in General section.
288         connections_max = 200;
289
290         # Maximum number of connections allowed per host. For example, if
291         # this is one (1) it means a host can link only once to the server.
292         # Attempting to link more than once would be refused.
293         #
294         # If this connection parameters block is used with incoming server
295         # connections it is recommended that this value is set to one (1).
296         connections_max_per_host = 10;
297
298         # Required version of the remote.  If these are specified then the
299         # remote must be of at least this version, or newer.  If older then
300         # the connection will not be allowed.
301         #
302         # version_protocol         - SILC protocol version
303         # version_software         - software version
304         # version_software_vendor  - vendor specific version extension
305         #
306         # The version_software_vendor may be for example a string or a build
307         # number of the software.  The string can be a regex string to match
308         # more widely.  Usually the vendor version checking is not necessary
309         # and can be omitted.
310         #version_protocol = "1.1";
311         #version_software = "1.3";
312         #version_software_vendor = "SomeVendor";
313
314         # Keepalive frequency (seconds).
315         keepalive_secs = 300;
316
317         # Reconnection parameters defines how the server reconnects to
318         # the remote if the connection was lost.  The reconnection phase
319         # use so called exponential backoff algorithm;  The reconnect
320         # interval grows when reconnect count grows.  Next example will
321         # attempt to reconnect after 10 seconds of disconnect, and the
322         # interval grows up to 600 seconds or until 7 times was attempted
323         # to reconnect.  These settings has effect only when connecting
324         # as initiator.
325         #
326         # reconnect_count        - how many times reconnect is attempted
327         # reconnect_interval     - how often reconnect it performed (seconds)
328         # reconnect_interval_max - maximum interval for reconnect, the
329         #                          server never waits longer than this to
330         #                          reconnect (seconds).
331         # reconnect_keep_trying  - whether to keep trying even after 
332         #                          reconnect_count is reached (the interval
333         #                          will be reconnect_interval_max).
334         reconnect_count = 7;
335         reconnect_interval = 10;
336         reconnect_interval_max = 600;
337         reconnect_keep_trying = true;
338
339         # Key exchange protocol rekey interval (seconds). How often to
340         # regenerate the session key with the remote. Initiator will perform
341         # the rekey and this setting affects only when connecting as initiator.
342         #key_exchange_rekey = 3600;
343
344         # Key exchange with Perfect Forward Secrecy (PFS). This will perform
345         # the rekey process with PFS, making the new key more secure since it
346         # is not dependent in any way of the old key. This will make the rekey
347         # process somewhat slower, than without PFS.
348         #key_exchange_pfs = true;
349
350         #TODO:
351         #connections_interval - incoming connection interval limit ?
352 };
353
354 #
355 # Configured client connections.
356 #
357 # The "Host" defines the incoming IP address or hostname of the client.
358 # If it is omitted all hosts will match this client connection.  The
359 # "Params" is optional and can be used to set specific connection parameters
360 # for this connection.
361 #
362 # The authentication data is specified by Passphrase and/or PublicKey.
363 # If both are provided then both password and public key based authentication
364 # is allowed.  If the Publickey is used it includes the file path to the
365 # public key file.  If none of them is provided then authentication is not
366 # required.  The PublicKey can be set multiple times to set multiple 
367 # public keys for one connection.
368 #
369 # Next example connection will match to all incoming client connections,
370 # and no authentication is required.
371 #
372 Client {
373         #Host = "10.1.*";
374         #Passphrase = "secret";
375         #PublicKey = "/path/to/the/user_my.key";
376         #PublicKey = "/path/to/the/user_221.key";
377         #PublicKey = "/path/to/the/user_313.key";
378         Params = "normal";
379 };
380
381 #
382 # Configured server administrator connections
383 #
384 # The fields "Host", "User", and "Nick", are optional but you are encouraged
385 # in using them to better identify your admins.
386 #
387 # The authentication data is specified by Passphrase and/or PublicKey.
388 # If both are provided then both password and public key based authentication
389 # is allowed.  If the PublicKey is used it includes the file path to the
390 # public key file.  If none of them is provided then authentication is not
391 # required.
392 #
393 Admin {
394         Host = "10.2.1.199";
395         User = "priikone";
396         Nick = "pekka";
397         Passphrase = "verysecret";
398         # PublicKey = "/path/to/the/public.key";
399 };
400
401 #
402 # Configured server connections.
403 #
404 # If server connections are configured it means that this server is
405 # router server.  Normal servers must not configure server connections.
406 # Thus, if this server is not router do not configure this section.  If
407 # your server is router, this must be configured.
408 #
409 # The authentication data is specified by Passphrase and/or PublicKey.
410 # If both are provided then both password and public key based authentication
411 # is allowed.  If the PublicKey is used it includes the file path to the
412 # public key file.  If none of them is provided then authentication is not
413 # required.
414 #
415 # If the connection is backup connection then set the "Backup" option
416 # to true. For normal connections set it false. If it is set to true then
417 # your server will be backup router.
418 #
419 ServerConnection {
420         Host = "10.2.1.7";
421         Passphrase = "verysecret";
422         #PublicKey = "/path/to/the/public.key";
423         Params = "normal";
424         Backup = false;
425 };
426
427 #
428 # Configured router connections
429 #
430 # For normal servers only one entry maybe configured to this section.  It
431 # must be the router this server will be connected to.  For router servers,
432 # this section includes all configured router connections.  The first
433 # configured connection is the primary route.  The Host specifies the
434 # remote hostname or IP address.  The Port specifies the remote port to
435 # connect when Initiator is true.  When Initiator is false the Port
436 # specifies the local port (listener port).
437 #
438 # The authentication data is specified by Passphrase and/or PublicKey.
439 # If both are provided then both password and public key based authentication
440 # is allowed.  If the PublicKey is used it includes the file path to the
441 # public key file.  If none of them is provided then authentication is not
442 # required.
443 #
444 # If you are the initiator of the connection then set the "Initiator"
445 # option to true.  If you are the responder of the connection (waiting for
446 # incoming connection) then set it to false.
447 #
448 # If the connection is backup router connection then set the "BackupHost"
449 # option to the IP address of the router that the backup router will
450 # replace if it becomes unavailable.  Set also the router's port to the
451 # "BackupPort" option.  For normal connection leave both commented. If this
452 # backup router is in our cell then set the "BackupLocal" option to true.
453 # If the backup router is in other cell then set it to false.
454 #
455 RouterConnection {
456         Host = "10.2.1.100";
457         Port = 706;
458         Passphrase = "verysecret";
459         #PublicKey = "/path/to/the/public.key";
460         Params = "normal";
461         Initiator = true;
462         #BackupHost = "10.2.1.6";
463         #BackupPort = 706;
464         #BackupLocal = true;
465 };
466
467 #
468 # Denied connections
469 #
470 # These connections are denied to connect to our server.
471 #
472 # The "Reason" field is mandatory, while the "Host" field can be omitted to 
473 # match everything.
474 #
475 #Deny {
476 #       Host = "10.2.1.99";
477 #       Reason = "Go away spammer";
478 #};
479 #Deny {
480 #       Host = "10.3.*";
481 #       Reason = "You are not welcome.";
482 #};