Project

General

Profile

strongswan.conf Reference » History » Version 5

Martin Willi, 24.07.2008 10:36

1 1 Martin Willi
= strongswan.conf =
2 1 Martin Willi
3 1 Martin Willi
== Overview ==
4 1 Martin Willi
5 1 Martin Willi
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.
6 1 Martin Willi
7 1 Martin Willi
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. 
8 1 Martin Willi
9 2 Martin Willi
Since 4.2.1, a default strongswan.conf gets installed in your sysconfdir, e.g. ''/etc/strongswan.conf''.
10 2 Martin Willi
11 1 Martin Willi
== Syntax ==
12 1 Martin Willi
13 1 Martin Willi
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:
14 1 Martin Willi
{{{
15 1 Martin Willi
settings := (section|keyvalue)*
16 1 Martin Willi
section  := name { settings }
17 1 Martin Willi
keyvalue := key = value\n
18 1 Martin Willi
}}}
19 1 Martin Willi
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:
20 1 Martin Willi
{{{
21 1 Martin Willi
. { } # \n \t space
22 1 Martin Willi
}}}
23 1 Martin Willi
An example might look like this:
24 1 Martin Willi
{{{
25 1 Martin Willi
a = b
26 1 Martin Willi
section-one {
27 1 Martin Willi
  somevalue = asdf
28 1 Martin Willi
  subsection {
29 1 Martin Willi
    othervalue = xxx
30 1 Martin Willi
  }
31 1 Martin Willi
  # yei, a comment 
32 1 Martin Willi
  yetanother = zz
33 1 Martin Willi
}
34 1 Martin Willi
section-two {
35 1 Martin Willi
  x = 12
36 1 Martin Willi
}
37 1 Martin Willi
}}}
38 1 Martin Willi
Indentation is optional, you may use tabs or spaces.
39 1 Martin Willi
40 1 Martin Willi
== Reading values ==
41 1 Martin Willi
42 1 Martin Willi
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'''.
43 1 Martin Willi
Have a look at the [source:trunk/src/libstrongswan/settings.h settings interface] how to query values.
44 1 Martin Willi
45 1 Martin Willi
== Defined keys ==
46 1 Martin Willi
The following keys are currently defined (using dot notation).
47 1 Martin Willi
48 4 Martin Willi
||charon.close_ike_on_child_failure||Close the IKE_SA if setup of the CHILD_SA along with IKE_AUTH failed||
49 4 Martin Willi
||charon.hash_and_url||Enable hash and URL support||
50 4 Martin Willi
||charon.install_routes||Install routes into a separate routing table for established IPsec tunnels||
51 4 Martin Willi
||charon.routing_table||Numerical routing table to install routes to||
52 4 Martin Willi
||charon.routing_table_prio||Priority of the routing table||
53 4 Martin Willi
||charon.load||Plugins to load in charon||
54 1 Martin Willi
||charon.plugins.sql.database||Database URI for charons [wiki:SQL] plugin||
55 1 Martin Willi
||charon.plugins.sql.loglevel||Loglevel for logging to [wiki:SQL] database||
56 5 Martin Willi
||charon.plugins.sql.lease_history||Disable logging of [wiki:SQL] IP pool leases||
57 4 Martin Willi
||charon.reuse_ikesa||Whether to initiate CHILD_SA within existing IKE_SAs
58 4 Martin Willi
||charon.threads||Number of worker threads in charon||
59 4 Martin Willi
||manager.database||Credential database URI for manager||
60 1 Martin Willi
||manager.debug||Enable debugging in manager||
61 4 Martin Willi
||manager.load||Plugins to load in manager||
62 4 Martin Willi
||manager.socket||FastCGI socket of manager, to run it statically||
63 1 Martin Willi
||manager.threads||Threads to use for request handling||
64 4 Martin Willi
||manager.timeout||Session timeout for manager||
65 4 Martin Willi
||medcli.database||Mediation client database URI||
66 4 Martin Willi
||medcli.dpd||DPD timeout to use in mediation client plugin||
67 4 Martin Willi
||medsrv.database||Mediation server database URI||
68 4 Martin Willi
||medsrv.debug||Debugging in mediation server web application||
69 4 Martin Willi
||medsrv.dpd||DPD timeout to use in mediation server plugin||
70 4 Martin Willi
||medsrv.load||Plugins to load in mediation server plugin||
71 4 Martin Willi
||medsrv.password_length||Minimum password length required for mediation server user accounts||
72 4 Martin Willi
||medsrv.rekey||Rekeying time on mediation connections in mediation server plugin||
73 4 Martin Willi
||medsrv.socket||Run Mediation server web application statically on socket||
74 4 Martin Willi
||medsrv.threads||Number of thread for mediation service web application||
75 4 Martin Willi
||medsrv.timeout||Session timeout for mediation service||
76 4 Martin Willi
||openac.load||Plugins to load in ipsec openac tool||
77 4 Martin Willi
||pool.load||Plugins to load in ipsec pool tool||