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