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
9 #
10 # Include global algorithms from the "silcalgs.conf" file. This file
11 # defines ciphers, hash functions, HMACs and PKCS algorithms that can
12 # be used.
13 #
14 Include "@ETCDIR@/silcalgs.conf";
15
16 #
17 # General configuration options
18 #
19 # These defines the default behaviour of the server.  Most of these values
20 # can be overridden with ConnectionParam, which can be defined independently
21 # for different connections.
22 #
23 General {
24         # This is the default path where to search modules.  If omitted
25         # built-in modules will be used.  Built-in modules will also be
26         # used if a module file cannot be located.
27         module_path = "@MODULESDIR@";
28
29         # If both passphrase and public key authentication is set for a
30         # connection the public key authentication is the preferred one
31         # to use.  Set this to `true' to prefer passphrase authentication
32         # over public key authentication in these cases.
33         #prefer_passphrase_auth = true;
34
35         # Set this to true if the server should require fully qualified
36         # domain names (FQDN) for incoming connections.
37         #require_reverse_lookup = false;        
38
39         # Default keepalive frequency (seconds). This can be overridden
40         # with ConnectionParam.
41         keepalive_secs = 300;
42
43         # Default reconnection parameters defines how the server reconnect
44         # to the remote if the connection was lost.  The reconnection phase
45         # use so called exponential backoff algorithm;  The reconnect
46         # interval grows when reconnect count grows.  Next example will
47         # attempt to reconnect after 10 seconds of disconnect, and the
48         # interval grows up to 600 seconds or until 7 times was attempted
49         # to reconnect.  These settings has effect only when connecting
50         # as initiator.
51         #
52         # reconnect_count        - how many times reconnect is attempted
53         # reconnect_interval     - how often reconnect it performed (seconds)
54         # reconnect_interval_max - maximum interval for reconnect, the
55         #                          server never waits longer than this to
56         #                          reconnect (seconds).
57         # reconnect_keep_trying  - whether to keep trying even after 
58         #                          reconnect_count is reached (the interval
59         #                          will be reconnect_interval_max).
60         #
61         # These can be overridden with ConnectionParam.
62         reconnect_count = 7;
63         reconnect_interval = 10;
64         reconnect_interval_max = 600;
65         reconnect_keep_trying = true;
66 };
67
68 #
69 # Server information
70 #
71 ServerInfo {
72         #
73         # Server FQDN and IP address
74         #
75         hostname = "lassi.kuo.fi.ssh.com";
76         ip = "10.2.1.6";
77         port = 706;
78
79         #
80         # ServerType field specifies the purpose of this server
81         # This is only a descriptive field.
82         #
83         ServerType = "Test Server";
84
85         #
86         # Geographic location
87         #
88         Location = "Kuopio, Finland";
89
90         #
91         # Full admin name
92         #
93         Admin = "Pekka Riikonen";
94
95         #
96         # Admin's email address
97         #
98         EMail = "priikone@poseidon.pspt.fi";
99
100         #
101         # Run SILC server as specific user and group. The server must be 
102         # initially run as root.
103         #
104         User = "nobody";
105         Group = "nobody";
106
107         #
108         # Public and private keys
109         #
110         PublicKey = "@ETCDIR@/silcd.pub";
111         PrivateKey = "@ETCDIR@/silcd.prv";
112
113         #
114         # Motd file
115         #
116         # Specifies the text file displayed on client connection
117         #
118         #MotdFile = "@ETCDIR@/motd.txt";
119
120         #
121         # Pid file
122         #
123         PidFile = "@PIDFILE@";
124 };
125
126 #
127 # Log files.
128 #
129 # This section is used to set various logging files, their paths, maximum
130 # sizes and logging options.
131 #
132 # There are only four defined channels allowed for defining (see below).
133 # The log channels have an importance value, and most important channels
134 # are redirected on the less important ones, thus setting a valid logging
135 # file for "infologfile" will ensure logging for all channels, while setting
136 # logging file for "errorlogfile" will ensure logging for channels "error"
137 # and "fatal"
138 #
139 Logging {
140         #
141         # If QuickLogs is true, then the logging files will be updated
142         # real-time. This causes a bit more CPU and HDD activity, but
143         # reduces memory usage. (if unsure say true).
144         #
145         QuickLogs = false;
146
147         #
148         # (Only if QuickLogs is false)
149         # FlushDelay tells log files update delay in case you have chosen
150         # buffering output.
151         #
152         FlushDelay = 180;
153
154         Info {
155                 File = "@LOGSDIR@/silcd.log";
156                 Size = "50k";
157         };
158         Warnings {
159                 File = "@LOGSDIR@/silcd_warnings.log";
160                 Size = "50k";
161         };
162         Errors {
163                 File = "@LOGSDIR@/silcd_errors.log";
164                 Size = "50k";
165         };
166         Fatals {
167                 File = "@LOGSDIR@/silcd_fatals.log";
168                 Size = "50k";
169         };
170 };
171
172 #
173 # Connection Parameters
174 #
175 # This section defined connection parameters.  It is possible to use
176 # specific parameters in different connections, and to define different
177 # parameters to different connections.  The parameters can define how the
178 # connection is handled and how the session is managed.  If connection
179 # parameters are not used in connections the default values will apply
180 # (or values defined in General section).  You can have multiple
181 # ConnectionParams blocks defined.
182 #
183 ConnectionParam {
184         # unique name. The name is used to reference to this parameter 
185         # block from the connections.
186         name = "normal";
187
188         # Keepalive frequency (seconds).
189         keepalive_secs = 300;
190
191         # Reconnection parameters defines how the server reconnects to
192         # the remote if the connection was lost.  The reconnection phase
193         # use so called exponential backoff algorithm;  The reconnect
194         # interval grows when reconnect count grows.  Next example will
195         # attempt to reconnect after 10 seconds of disconnect, and the
196         # interval grows up to 600 seconds or until 7 times was attempted
197         # to reconnect.  These settings has effect only when connecting
198         # as initiator.
199         #
200         # reconnect_count        - how many times reconnect is attempted
201         # reconnect_interval     - how often reconnect it performed (seconds)
202         # reconnect_interval_max - maximum interval for reconnect, the
203         #                          server never waits longer than this to
204         #                          reconnect (seconds).
205         # reconnect_keep_trying  - whether to keep trying even after 
206         #                          reconnect_count is reached (the interval
207         #                          will be reconnect_interval_max).
208         reconnect_count = 7;
209         reconnect_interval = 10;
210         reconnect_interval_max = 600;
211         reconnect_keep_trying = true;
212
213         #TODO:
214         #key_exchange_rekey - rekey timeout
215         #key_exchange_pfs - rekey PFS
216         #key_exchange_mutual_auth - SKE mutual auth
217
218         #connections_max - max incoming connection
219         #connections_interval - incoming connection interval limit ?
220 };
221
222 #
223 # Configured client connections.
224 #
225 # The "host" defines the incoming IP address or hostname of the client.
226 # If it is omitted all hosts will match this client connection.  The
227 # "param" is optional and can be used to set specific connection parameters
228 # for this connection.
229 #
230 # The authentication data is specified by Passphrase and/or Publickey.
231 # If both are provided then both password and public key based authentication
232 # is allowed.  If the Publickey is used it includes the file path to the
233 # public key file.  If none of them is provided then authentication is not
234 # required.
235 #
236 # Next example connection will match to all incoming client connections,
237 # and no authentication is required
238 #
239 Client { 
240         #host = "";
241         #passphrase = "secret";
242         #publickey = "/path/to/the/public.key";
243         param = "normal";
244 };
245
246 #
247 # Configured server administrator connections
248 #
249 # The fields "Host", "User", and "Nick", are optional but you are encouraged
250 # in using them to better identify your admins.
251 #
252 # The authentication data is specified by Passphrase and/or Publickey.
253 # If both are provided then both password and public key based authentication
254 # is allowed.  If the Publickey is used it includes the file path to the
255 # public key file.  If none of them is provided then authentication is not
256 # required.
257 #
258 Admin {
259         Host = "10.2.1.199";
260         User = "priikone";
261         Nick = "pekka";
262         Passphrase = "verysecret";
263         # Publickey = "/path/to/the/public.key";
264 };
265
266 #
267 # Configured server connections.
268 #
269 # If server connections are configured it means that this server is
270 # router server.  Normal servers must not configure server connections.
271 # Thus, if this server is not router do not configure this section.  If
272 # your server is router, this must be configured.
273 #
274 # The authentication data is specified by Passphrase and/or Publickey.
275 # If both are provided then both password and public key based authentication
276 # is allowed.  If the Publickey is used it includes the file path to the
277 # public key file.  If none of them is provided then authentication is not
278 # required.
279 #
280 # If the connection is backup connection then set the "Backup" option
281 # to true. For normal connections set it false. If it is set to true then
282 # this server will be backup router.
283 #
284 ServerConnection {
285         Host = "10.2.1.7";
286         Passphrase = "verysecret";
287         # Publickey = "/path/to/the/public.key";
288         VersionID = 1;
289         Param = "normal";
290         Backup = false;
291 };
292
293 #
294 # Configured router connections
295 #
296 # For normal servers only one entry maybe configured to this section.  It
297 # must be the router this server will be connected to.  For router servers,
298 # this section includes all configured router connections.  The first
299 # configured connection is the primary route.
300 #
301 # The authentication data is specified by Passphrase and/or Publickey.
302 # If both are provided then both password and public key based authentication
303 # is allowed.  If the Publickey is used it includes the file path to the
304 # public key file.  If none of them is provided then authentication is not
305 # required.
306 #
307 # If you are the initiator of the connection then set the "Initiator"
308 # option to true.  If you are the responder of the connection (waiting for
309 # incoming connection) then set it to false.
310 #
311 # If the connection is backup router connection then set the "BackupHost"
312 # option to the IP address of the router that the backup router will
313 # replace if it becomes unavailable.  Set also the router's port to the
314 # "BackupPort" option.  For normal connection leave both commented. If this
315 # backup router is in our cell then set the "LocalBackup" option to true.
316 # If the backup router is in other cell then set it to false.
317 #
318 RouterConnection {
319         Host = "10.2.1.100";
320         Port = 706;
321         Passphrase = "verysecret";
322         # Publickey = "/path/to/the/public.key";
323         VersionID = 1;
324         Param = "normal";
325         Initiator = true;
326         #BackupHost = "10.2.1.6";
327         #BackupPort = 706;
328         #LocalBackup = true;
329 };
330
331 #
332 # Denied connections
333 #
334 # These connections are denied to connect to our server.
335 #
336 # The "Reason" field is mandatory, while the "Host" and "Port" fields can be
337 # omitted to match everything.
338 #
339 #Deny {
340 #       Host = "10.2.1.99";
341 #       Port = 706;
342 #       Reason = "Go away spammer";
343 #};
344 #Deny {
345 #       Host = "10.3.*";
346 #       Reason = "You are not welcome.";
347 #};