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