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