Added support for multiple PublicKey instances in the config
[silc.git] / doc / example_silcd.conf.in
index ce9c2e9816c6fa08b964ab7f337b833e11572e38..2612c2197333cdcd332f74a13afb4ba5c85d1a9d 100644 (file)
@@ -5,6 +5,18 @@
 # configuration possibilities and may not actually give any sensible
 # configuration.  For real life example see the examples/ directory.
 #
+# Most of the settings in this file are optional.  If some setting is
+# mandatory it is mentioned separately.  If some setting is omitted it means
+# that its builtin default value will be used.  Boolean values, that is
+# setting something on or off, is done by setting either "true" or "false"
+# value, respectively.
+#
+# The ServerInfo section is mandatory section.  Other sections are optional.
+# However, if General section is defined it must be defined before the
+# ConnectionParams sections.  On the other hand, the ConnectionParams section
+# must be defined before Client, ServerConnection or RouterConnection 
+# sections.  Other sections can be in free order.
+#
 
 #
 # Include global algorithms from the "silcalgs.conf" file. This file
@@ -17,7 +29,7 @@ Include "@ETCDIR@/silcalgs.conf";
 # General configuration options
 #
 # These defines the default behaviour of the server.  Most of these values
-# can be overridden with ConnectionParam, which can be defined independently
+# can be overridden with ConnectionParams, which can be defined independently
 # for different connections.
 #
 General {
@@ -32,12 +44,23 @@ General {
        # over public key authentication in these cases.
        #prefer_passphrase_auth = true;
 
-       # Set this to true if you the server to require fully qualified
-       # domain names (FQDN) for incoming connections.
-       #require_reverse_lookup = false;        
+       # Set this to true if the server should require fully qualified
+       # domain names (FQDN) for incoming connections. If true, a host
+       # without FQDN cannot connect to the server.
+       #require_reverse_lookup = true;
+
+       # Maximum number of incoming connections allowed to this server.
+       # If more attempt to connect they will be refused.
+       connections_max = 1000;
+
+       # Maximum number of incoming connections allowed per single host.
+       # For example, if this is one (1) it means a host can link only
+       # once to the server. Attempting to connect more than once would be
+       # refused. This can be overridden with ConnectionParams.
+       #connections_max_per_host = 10;
 
        # Default keepalive frequency (seconds). This can be overridden
-       # with ConnectionParam.
+       # with ConnectionParams.
        keepalive_secs = 300;
 
        # Default reconnection parameters defines how the server reconnect
@@ -46,7 +69,8 @@ General {
        # interval grows when reconnect count grows.  Next example will
        # attempt to reconnect after 10 seconds of disconnect, and the
        # interval grows up to 600 seconds or until 7 times was attempted
-       # to reconnect.
+       # to reconnect.  These settings has effect only when connecting
+       # as initiator.
        #
        # reconnect_count        - how many times reconnect is attempted
        # reconnect_interval     - how often reconnect it performed (seconds)
@@ -57,11 +81,39 @@ General {
        #                          reconnect_count is reached (the interval
        #                          will be reconnect_interval_max).
        #
-       # These can be overridden with ConnectionParam.
+       # These can be overridden with ConnectionParams.
        reconnect_count = 7;
        reconnect_interval = 10;
        reconnect_interval_max = 600;
        reconnect_keep_trying = true;
+
+       # Key exchange protocol rekey interval (seconds). How often to
+       # regenerate the session key with the remote. Initiator will perform
+       # the rekey and this setting affects only when connecting as intiator.
+       # This can be overridden with ConnectionParams.
+       #key_exchange_rekey = 3600;
+
+       # Key exchange with Perfect Forward Secrecy (PFS). This will perform
+       # the rekey process with PFS, making the new key more secure since it
+       # is not dependent in any way of the old key. This will make the rekey
+       # process somewhat slower, than without PFS.  This can be overridden
+       # with ConnectionParams.
+       #key_exchange_pfs = true;
+
+       # Key exchange timeout (seconds). If the key exchange protocol is not
+       # finished in this time period the remote connection will be closed.
+       #key_exchange_timeout = 60;
+
+       # Connection authentication timeout (seconds). If the connection
+       # authentication protocol is not finished in this time period the
+       # remote connection will be closed.
+       #conn_auth_timeout = 60;
+
+       # Channel key rekey interval (seconds). How often channel key is
+       # regenerated. Note that channel key is regenerated also always when
+       # someone joins or leaves the channel.
+       #channel_rekey_secs = 3600;
+
 };
 
 #
@@ -89,12 +141,12 @@ ServerInfo {
        #
        # Full admin name
        #
-       Admin = "Pekka Riikonen";
+       Admin = "Foo T. Bar";
 
        #
        # Admin's email address
        #
-       EMail = "priikone@poseidon.pspt.fi";
+       AdminEmail = "foo-admin@bar.com";
 
        #
        # Run SILC server as specific user and group. The server must be 
@@ -127,6 +179,7 @@ ServerInfo {
 #
 # This section is used to set various logging files, their paths, maximum
 # sizes and logging options.
+#
 # There are only four defined channels allowed for defining (see below).
 # The log channels have an importance value, and most important channels
 # are redirected on the less important ones, thus setting a valid logging
@@ -178,11 +231,25 @@ Logging {
 # (or values defined in General section).  You can have multiple
 # ConnectionParams blocks defined.
 #
-ConnectionParam {
+ConnectionParams {
        # unique name. The name is used to reference to this parameter 
-       # block from the connections.
+       # block from the connections. This field is mandatory.
        name = "normal";
 
+       # Maximum number of connections allowed. More connections will be
+       # refused. This can be used for example to limit number of clients.
+       # Note that this never can be larger than the connections_max
+       # specified in General section.
+       connections_max = 200;
+
+       # Maximum number of connections allowed per host. For example, if
+       # this is one (1) it means a host can link only once to the server.
+       # Attempting to link more than once would be refused.
+       #
+       # If this connection parameters block is used with incoming server
+       # connections it is recommended that this value is set to one (1).
+       connections_max_per_host = 10;
+
        # Keepalive frequency (seconds).
        keepalive_secs = 300;
 
@@ -192,7 +259,8 @@ ConnectionParam {
        # interval grows when reconnect count grows.  Next example will
        # attempt to reconnect after 10 seconds of disconnect, and the
        # interval grows up to 600 seconds or until 7 times was attempted
-       # to reconnect.
+       # to reconnect.  These settings has effect only when connecting
+       # as initiator.
        #
        # reconnect_count        - how many times reconnect is attempted
        # reconnect_interval     - how often reconnect it performed (seconds)
@@ -207,12 +275,18 @@ ConnectionParam {
        reconnect_interval_max = 600;
        reconnect_keep_trying = true;
 
-       #TODO:
-       #key_exchange_rekey - rekey timeout
-       #key_exchange_pfs - rekey PFS
-       #key_exchange_mutual_auth - SKE mutual auth
+       # Key exchange protocol rekey interval (seconds). How often to
+       # regenerate the session key with the remote. Initiator will perform
+       # the rekey and this setting affects only when connecting as initiator.
+       #key_exchange_rekey = 3600;
 
-       #connections_max - max incoming connection
+       # Key exchange with Perfect Forward Secrecy (PFS). This will perform
+       # the rekey process with PFS, making the new key more secure since it
+       # is not dependent in any way of the old key. This will make the rekey
+       # process somewhat slower, than without PFS.
+       #key_exchange_pfs = true;
+
+       #TODO:
        #connections_interval - incoming connection interval limit ?
 };
 
@@ -224,20 +298,23 @@ ConnectionParam {
 # "param" is optional and can be used to set specific connection parameters
 # for this connection.
 #
-# The authentication data is specified by Passphrase and/or Publickey.
+# The authentication data is specified by Passphrase and/or PublicKey.
 # If both are provided then both password and public key based authentication
 # is allowed.  If the Publickey is used it includes the file path to the
 # public key file.  If none of them is provided then authentication is not
-# required.
+# required.  The PublicKey can be set multiple times to set multiple 
+# public keys for one connection.
 #
 # Next example connection will match to all incoming client connections,
-# and no authentication is required
-#
-Client { 
-       #host = "";
-       #passphrase = "secret";
-       #publickey = "/path/to/the/public.key";
-       param = "normal";
+# and no authentication is required.
+#
+Client {
+       #Host = "10.1.*";
+       #Passphrase = "secret";
+       #PublicKey = "/path/to/the/user_my.key";
+       #PublicKey = "/path/to/the/user_221.key";
+       #PublicKey = "/path/to/the/user_313.key";
+       Params = "normal";
 };
 
 #
@@ -246,9 +323,9 @@ Client {
 # The fields "Host", "User", and "Nick", are optional but you are encouraged
 # in using them to better identify your admins.
 #
-# The authentication data is specified by Passphrase and/or Publickey.
+# The authentication data is specified by Passphrase and/or PublicKey.
 # If both are provided then both password and public key based authentication
-# is allowed.  If the Publickey is used it includes the file path to the
+# is allowed.  If the PublicKey is used it includes the file path to the
 # public key file.  If none of them is provided then authentication is not
 # required.
 #
@@ -257,7 +334,7 @@ Admin {
        User = "priikone";
        Nick = "pekka";
        Passphrase = "verysecret";
-       # Publickey = "/path/to/the/public.key";
+       # PublicKey = "/path/to/the/public.key";
 };
 
 #
@@ -268,9 +345,9 @@ Admin {
 # Thus, if this server is not router do not configure this section.  If
 # your server is router, this must be configured.
 #
-# The authentication data is specified by Passphrase and/or Publickey.
+# The authentication data is specified by Passphrase and/or PublicKey.
 # If both are provided then both password and public key based authentication
-# is allowed.  If the Publickey is used it includes the file path to the
+# is allowed.  If the PublicKey is used it includes the file path to the
 # public key file.  If none of them is provided then authentication is not
 # required.
 #
@@ -281,9 +358,8 @@ Admin {
 ServerConnection {
        Host = "10.2.1.7";
        Passphrase = "verysecret";
-       # Publickey = "/path/to/the/public.key";
-       VersionID = 1;
-       Param = "normal";
+       #PublicKey = "/path/to/the/public.key";
+       Params = "normal";
        Backup = false;
 };
 
@@ -295,9 +371,9 @@ ServerConnection {
 # this section includes all configured router connections.  The first
 # configured connection is the primary route.
 #
-# The authentication data is specified by Passphrase and/or Publickey.
+# The authentication data is specified by Passphrase and/or PublicKey.
 # If both are provided then both password and public key based authentication
-# is allowed.  If the Publickey is used it includes the file path to the
+# is allowed.  If the PublicKey is used it includes the file path to the
 # public key file.  If none of them is provided then authentication is not
 # required.
 #
@@ -309,20 +385,19 @@ ServerConnection {
 # option to the IP address of the router that the backup router will
 # replace if it becomes unavailable.  Set also the router's port to the
 # "BackupPort" option.  For normal connection leave both commented. If this
-# backup router is in our cell then set the "LocalBackup" option to true.
+# backup router is in our cell then set the "BackupLocal" option to true.
 # If the backup router is in other cell then set it to false.
 #
 RouterConnection {
        Host = "10.2.1.100";
        Port = 706;
        Passphrase = "verysecret";
-       # Publickey = "/path/to/the/public.key";
-       VersionID = 1;
-       Param = "normal";
+       #PublicKey = "/path/to/the/public.key";
+       Params = "normal";
        Initiator = true;
        #BackupHost = "10.2.1.6";
        #BackupPort = 706;
-       #LocalBackup = true;
+       #BackupLocal = true;
 };
 
 #
@@ -330,12 +405,11 @@ RouterConnection {
 #
 # These connections are denied to connect to our server.
 #
-# The "Reason" field is mandatory, while the "Host" and "Port" fields can be
-# omitted to match everything.
+# The "Reason" field is mandatory, while the "Host" field can be omitted to 
+# match everything.
 #
 #Deny {
 #      Host = "10.2.1.99";
-#      Port = 706;
 #      Reason = "Go away spammer";
 #};
 #Deny {