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