strongswan.conf Reference » History » Version 3
Version 2 (Martin Willi, 18.04.2008 14:57) → Version 3/195 (Tobias Brunner, 18.04.2008 15:24)
= strongswan.conf =
== Overview ==
While the [wiki:IpsecConf ipsec.conf] configuration file is well suited to define IPsec related configuration parameters, it is not useful for other strongSwan applications to read options from this file. The file is hard to parse and only starter is capable of doing so.
As the number of components of the strongSwan project is growing, we need a more flexible configuration file, easy to extend and useable by all components. The configuration format uses hierarchal sections and a list of key/value pairs in each section.
Since 4.2.1, a default strongswan.conf gets installed in your sysconfdir, e.g. ''/etc/strongswan.conf''.
== Syntax ==
Each section has a name, followed by C-Style curly brackets defining the sections body. Each section body contains a set of subsections and key/value pairs:
{{{
settings := (section|keyvalue)*
section := name { settings }
keyvalue := key = value\n
}}}
Values must be terminated by a newline. Comments are possible using the #-character, but be careful: The parser implementation is currently limited and does not like brackets in comments. Section names and keys may contain any printable character except:
{{{
. { } # \n \t space
}}}
An example might look like this:
{{{
a = b
section-one {
somevalue = asdf
subsection {
othervalue = xxx
}
# yei, a comment
yetanother = zz
}
section-two {
x = 12
}
}}}
Indentation is optional, you may use tabs or spaces.
== Reading values ==
The config file is read by libstrongswan during library initialization. Values are accessed using a dot-separated section list and a key: Accessing '''section-one.subsection.othervalue''' will return '''xxx'''.
Have a look at the [source:trunk/src/libstrongswan/settings.h settings interface] how to query values.
== Defined keys ==
The following keys are currently defined (using dot notation).
||charon.threads||Number of worker threads in charon||
||charon.plugins.sql.database||Database URI for charons [wiki:SQL] plugin||
||charon.plugins.sql.loglevel||Loglevel for logging to [wiki:SQL] database||
||charon.hash_and_url||Enable hash and URL support||
||manager.socket||FastCGI socket of manager, to run it statically||
||manager.debug||Enable debugging in manager||
||manager.timeout||Session timeout for manager||
||manager.threads||Threads to use for request handling||
||manager.database||Database URI||
== Overview ==
While the [wiki:IpsecConf ipsec.conf] configuration file is well suited to define IPsec related configuration parameters, it is not useful for other strongSwan applications to read options from this file. The file is hard to parse and only starter is capable of doing so.
As the number of components of the strongSwan project is growing, we need a more flexible configuration file, easy to extend and useable by all components. The configuration format uses hierarchal sections and a list of key/value pairs in each section.
Since 4.2.1, a default strongswan.conf gets installed in your sysconfdir, e.g. ''/etc/strongswan.conf''.
== Syntax ==
Each section has a name, followed by C-Style curly brackets defining the sections body. Each section body contains a set of subsections and key/value pairs:
{{{
settings := (section|keyvalue)*
section := name { settings }
keyvalue := key = value\n
}}}
Values must be terminated by a newline. Comments are possible using the #-character, but be careful: The parser implementation is currently limited and does not like brackets in comments. Section names and keys may contain any printable character except:
{{{
. { } # \n \t space
}}}
An example might look like this:
{{{
a = b
section-one {
somevalue = asdf
subsection {
othervalue = xxx
}
# yei, a comment
yetanother = zz
}
section-two {
x = 12
}
}}}
Indentation is optional, you may use tabs or spaces.
== Reading values ==
The config file is read by libstrongswan during library initialization. Values are accessed using a dot-separated section list and a key: Accessing '''section-one.subsection.othervalue''' will return '''xxx'''.
Have a look at the [source:trunk/src/libstrongswan/settings.h settings interface] how to query values.
== Defined keys ==
The following keys are currently defined (using dot notation).
||charon.threads||Number of worker threads in charon||
||charon.plugins.sql.database||Database URI for charons [wiki:SQL] plugin||
||charon.plugins.sql.loglevel||Loglevel for logging to [wiki:SQL] database||
||charon.hash_and_url||Enable hash and URL support||
||manager.socket||FastCGI socket of manager, to run it statically||
||manager.debug||Enable debugging in manager||
||manager.timeout||Session timeout for manager||
||manager.threads||Threads to use for request handling||
||manager.database||Database URI||