New silcconfig library and server parser. Merged silc-newconfig-final.patch.
[silc.git] / doc / example_silcd.conf.in
1 #
2 # Example configuration file.  Note that this attempts to present various
3 # configuration possibilities and may not actually give any sensible
4 # configuration.  For real life example see the examples/ directory.
5 #
6
7 #
8 # General configuration options
9 #
10 General {
11         # This is the default path where to search modules
12         # You can comment it out to use builtin modules globally.
13         ModulePath = "@MODULESDIR@";
14 };
15
16 #
17 # Configured ciphers
18 #
19 # The "Module" option can be either absolute or relative to the "ModulePath"
20 # option.
21 # If commented out forces using of built-in modules.
22 #
23 cipher {
24         name = "aes-256-cbc";
25         module = "aes.sim.so";
26         key_length = 32;
27         block_length = 16;
28 };
29 cipher {
30         name = "aes-192-cbc";
31         module = "aes.sim.so";
32         key_length = 24;
33         block_length = 16;
34 };
35 cipher {
36         name = "aes-128-cbc";
37         module = "aes.sim.so";
38         key_length = 16;
39         block_length = 16;
40 };
41 cipher {
42         name = "twofish-256-cbc";
43         module = "twofish.sim.so";
44         key_length = 32;
45         block_length = 16;
46 };
47 cipher {
48         name = "twofish-192-cbc";
49         module = "twofish.sim.so";
50         key_length = 24;
51         block_length = 16;
52 };
53 cipher {
54         name = "twofish-128-cbc";
55         module = "twofish.sim.so";
56         key_length = 16;
57         block_length = 16;
58 };
59 cipher {
60         name = "mars-256-cbc";
61         module = "mars.sim.so";
62         key_length = 32;
63         block_length = 16;
64 };
65 cipher {
66         name = "mars-192-cbc";
67         module = "mars.sim.so";
68         key_length = 24;
69         block_length = 16;
70 };
71 cipher {
72         name = "mars-128-cbc";
73         module = "mars.sim.so";
74         key_length = 16;
75         block_length = 16;
76 };
77 cipher {
78         name = "none";
79         module = "none.sim.so";
80 };
81
82 #
83 # Configured hash functions
84 #
85 hash {
86         name = "sha1";
87         block_length = 64;
88         digest_length = 20;
89 };
90 hash {
91         name = "md5";
92         block_length = 64;
93         digest_length = 16;
94 };
95
96 #
97 # Configured HMAC functions. The hash function used in the HMAC must
98 # be configured in the hash section.
99 #
100 hmac {
101         name = "hmac-sha1-96";
102         hash = "sha1";
103         mac_length = 12;
104 };
105 hmac {
106         name = "hmac-md5-96";
107         hash = "md5";
108         mac_length = 12;
109 };
110 hmac {
111         name = "hmac-sha1";
112         hash = "sha1";
113         mac_length = 20;
114 };
115 hmac {
116         name = "hmac-md5";
117         hash = "md5";
118         mac_length = 16;
119 };
120
121 #
122 # Configured PKCS
123 #
124 PKCS { name = "rsa"; };
125
126 #
127 # Server information
128 #
129 ServerInfo {
130         #
131         # Server FQDN and IP address
132         #
133         hostname = "lassi.kuo.fi.ssh.com";
134         ip = "10.2.1.6";
135         port = 706;
136
137         #
138         # ServerType field specifies the purpose of this server
139         # This is only a descriptive field.
140         #
141         ServerType = "Test Server";
142
143         #
144         # Geographic location
145         #
146         Location = "Kuopio, Finland";
147
148         #
149         # Full admin name
150         #
151         Admin = "Pekka Riikonen";
152
153         #
154         # Admin's email address
155         #
156         EMail = "priikone@poseidon.pspt.fi";
157
158         #
159         # Run SILC server as specific user and group. The server must be initially
160         # run as root.
161         #
162         User = "nobody";
163         Group = "nobody";
164
165         #
166         # Public and private keys
167         #
168         PublicKey = "@ETCDIR@/silcd.pub";
169         PrivateKey = "@ETCDIR@/silcd.prv";
170
171         #
172         # Motd file
173         #
174         # Specifies the text file displayed on client connection
175         #
176         #MotdFile = "@ETCDIR@/motd.txt";
177
178         #
179         # Pid file
180         #
181         PidFile = "@PIDFILE@";
182 };
183
184 #
185 # Log files.
186 #
187 # This section is used to set various logging files, their paths, maximum
188 # sizes and logging options.
189 # There are only four defined channels allowed for defining (see below).
190 # The log channels have an importance value, and most important channels
191 # are redirected on the less important ones, thus setting a valid logging
192 # file for "infologfile" will ensure logging for all channels, while setting
193 # logging file for "errorlogfile" will ensure logging for channels "error"
194 # and "fatal"
195 #
196 Logging {
197         #
198         # If QuickLogs is true, then the logging files will be updated
199         # real-time. This causes a bit more CPU and HDD activity, but
200         # reduces memory usage. (if unsure say true).
201         #
202         QuickLogs = false;
203
204         #
205         # (Only if QuickLogs is false)
206         # FlushDelay tells log files update delay in case you have chosen
207         # buffering output.
208         #
209         FlushDelay = 180;
210
211         Info {
212                 File = "@LOGSDIR@/silcd.log";
213                 Size = "50k";
214         };
215         Warnings {
216                 File = "@LOGSDIR@/silcd_warnings.log";
217                 Size = "50k";
218         };
219         Errors {
220                 File = "@LOGSDIR@/silcd_errors.log";
221                 Size = "50k";
222         };
223         Fatals {
224                 File = "@LOGSDIR@/silcd_fatals.log";
225                 Size = "50k";
226         };
227 };
228
229 #
230 # Connection classes (UNSUPPORTED)
231 #
232 # This section is used to define connection classes. These can be
233 # used to optimize the server and the connections.
234 #
235 #Class {
236 #       Name = "norm";
237 #       Ping = 100;
238 #       Connect = 100;
239 #       Links = 100;
240 #};
241
242 #
243 # Configured client connections.
244 #
245 # All fields except Class are optional.  Omitted fields are assumed
246 # to be generic (e.g. if the "Host" field is omitted all hosts will match
247 # this client class).
248 #
249 #Client {
250 #       Host = "127.0.0.1";
251 #       Port = 706;
252 #       Class = "local";
253 #};
254 Client {
255         Port = 706;
256         Class = "norm";
257 };
258
259 #
260 # Configured server administrator connections
261 #
262 # The fields "Host", "User", and "Nick", are optional but you are encouraged
263 # in using them to better identify your admins.
264 # "AuthMethod" and "AuthData" fields are mandatory.  The "AuthMethod" field
265 # can be either the special string "passwd" or "pubkey" to identify the type
266 # of data specified by "AuthData".
267 #
268 Admin {
269         Host = "10.2.1.199";
270         User = "priikone";
271         Nick = "pekka";
272         AuthMethod = "passwd";
273         AuthData = "verysecret";
274 };
275
276 #
277 # Denied connections
278 #
279 # These connections are denied to connect to our server.
280 #
281 # The "Reason" field is mandatory, while the "Host" and "Port" fields can be
282 # omitted to match everything.
283 #
284 #Deny {
285 #       Host = "10.2.1.99";
286 #       Port = 706;
287 #       Reason = "Go away spammer";
288 #};
289 #Deny {
290 #       Host = "10.3.*";
291 #       Reason = "You are not welcome.";
292 #};
293
294 #
295 # Configured server connections.
296 #
297 # If server connections are configured it means that this server is
298 # router server.  Normal servers must not configure server connections.
299 # Thus, if this server is not router do not configure this section.  If
300 # your server is router, this must be configured.
301 #
302 # The "AuthData" option is either passphrase or file path to the public key
303 # file. If the connection is backup connection then set the "Backup" option
304 # to true. For normal connections set it false. If it is
305 # set to true then this server will be backup router.
306 #
307 ServerConnection {
308         Host = "10.2.1.7";
309         AuthMethod = passwd;
310         AuthData = "verysecret";
311         Port = 706;
312         VersionID = 1;
313         Class = "norm";
314         Backup = false;
315 };
316
317 #
318 # Configured router connections
319 #
320 # For normal servers only one entry maybe configured to this section.  It
321 # must be the router this server will be connected to.  For router servers,
322 # this section includes all configured router connections.  The first
323 # configured connection is the primary route.
324 #
325 # The "AuthData" option is either passphrase or file path to the public key
326 # file. If you are the initiator of the connection then set the "Initiator"
327 # option to true.  If you are the responder of the connection (waiting for
328 # incoming connection) then set it to false.
329 #
330 # If the connection is backup router connection then set the "BackupHost"
331 # option to the IP address of the router that the backup router will
332 # replace if it becomes unavailable.  Set also the router's port to the
333 # "BackupPort" option.  For normal connection leave both commented. If this
334 # backup router is in our cell then set the "LocalBackup" option to true.
335 # If the backup router is in other cell then set it to false.
336 #
337 RouterConnection {
338         Host = "10.2.1.100";
339         AuthMethod = passwd;
340         AuthData = "verysecret";
341         Port = 706;
342         VersionID = 1;
343         Class = "norm";
344         Initiator = true;
345         #BackupHost = "10.2.1.6";
346         #BackupPort = 706;
347         #LocalBackup = true;
348 };