1 .TH STRONGSWAN.CONF 5 "" "@PACKAGE_VERSION@" "strongSwan"
3 strongswan.conf \- strongSwan configuration file
7 configuration file is well suited to define IPsec related configuration
8 parameters, it is not useful for other strongSwan applications to read options
10 The file is hard to parse and only
12 is capable of doing so. As the number of components of the strongSwan project
13 is continually growing, a more flexible configuration file was needed, one that
14 is easy to extend and can be used by all components. With strongSwan 4.2.1
15 .IR strongswan.conf (5)
16 was introduced which meets these requirements.
19 The format of the strongswan.conf file consists of hierarchical
23 in each section. Each section has a name, followed by C-Style curly brackets
24 defining the section body. Each section body contains a set of subsections
28 settings := (section|keyvalue)*
29 section := name { settings }
30 keyvalue := key = value\\n
33 Values must be terminated by a newline.
35 Comments are possible using the \fB#\fP-character.
37 Section names and keys may contain any printable character except:
40 . , : { } = " # \\n \\t space
43 An example file in this format might look like this:
60 Indentation is optional, you may use tabs or spaces.
63 Options that define an integer value can be specified as decimal (the default)
64 or hexadecimal ("0x" prefix, upper- or lowercase letters are accepted).
65 Locale-dependent strings (e.g. the thousands separator of the current locale)
66 may also be accepted in locales other than "C".
68 Options that define a floating-point value can be specified as decimal (the
69 default) or hexadecimal ("0x" prefix, upper- or lowercase letters are accepted).
70 The radix character (decimal separator) in either case is locale-dependent,
74 Unless stated otherwise, options that define a time are specified in seconds.
75 The "s", "m", "h" and "d" suffixes may be used to automatically convert values
76 given in seconds, minutes, hours or days (for instance, instead of configuring
77 a rekey time of 4 hours as "14400" seconds, "4h" may be used).
79 There are some global options that don't accept these suffixes as they are
80 configured as integer values in seconds or milliseconds, or even as
81 floating-point numbers (e.g. the retransmission timeout). Options that accept
82 the suffixes have a corresponding default value.
84 .SH REFERENCING OTHER SECTIONS
85 It is possible to inherit settings and sections from another section. This
86 feature is mainly useful in swanctl.conf (which uses the same file format).
87 The syntax is as follows:
90 section := name : references { settings }
91 references := absname[, absname]*
92 absname := name[.name]*
95 All key/value pairs and all subsections of the referenced sections will be
96 inherited by the section that references them via their absolute name. Values
97 may be overridden in the section or any of its sub-sections (use an empty
98 assignment to clear a value so its default value, if any, will apply). It is
99 currently not possible to limit the inclusion level or clear/remove inherited
102 If the order is important (e.g. for auth rounds in a connection, if \fIround\fR
103 is not used), it should be noted that inherited settings/sections will follow
104 those defined in the current section (if multiple sections are referenced, their
105 settings are enumerated left to right).
107 References are evaluated dynamically at runtime, so referring to sections later
108 in the config file or included via other files is no problem.
110 Here is an example of how this might look like:
114 # default settings for all conns (e.g. a cert, or IP pools)
117 # defaults if eap is used (e.g. a remote auth round)
120 # defaults for child configs (e.g. traffic selectors)
123 conn-a : conn-defaults, eap-defaults {
124 # set/override stuff specific to this connection
126 child-a : child-defaults {
127 # set/override stuff specific to this child
131 conn-b : conn-defaults {
132 # set/override stuff specific to this connection
134 child-b : child-defaults {
135 # set/override stuff specific to this child
139 conn-c : connections.conn-a {
140 # everything is inherited, including everything conn-a
141 # already inherits from the sections it and its
142 # sub-section reference
151 statement it is possible to include other files into strongswan.conf, e.g.
154 include /some/path/*.conf
157 If the file name is not an absolute path, it is considered to be relative
158 to the directory of the file containing the include statement. The file name
159 may include shell wildcards (see
161 Also, such inclusions can be nested.
163 Sections loaded from included files
165 previously loaded sections; already existing values are
167 It is important to note that settings are added relative to the section the
168 include statement is in.
170 As an example, the following three files result in the same final
171 config as the one given above:
176 somevalue = before include
182 # settings loaded from this file are added to section-one
183 # the following replaces the previous value
191 # this extends section-one and subsection
194 # this replaces the previous value
204 Values are accessed using a dot-separated section list and a key.
205 With reference to the example above, accessing
206 .B section-one.subsection.othervalue
211 The following keys are currently defined (using dot notation). The default
212 value (if any) is listed in brackets after the key.