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