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