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 In rare circumstances \fB.\fP characters may be used in section names (e.g. for
44 log file names in a filelog section), but should generally be avoided.
45 To use \fB:\fP characters in section names (e.g. for Windows log file paths)
46 they may be written as \fB::\fP, which the parser replaces with a single
49 An example file in this format might look like this:
66 Indentation is optional, you may use tabs or spaces.
69 .SH REFERENCING OTHER SECTIONS
70 It is possible to inherit settings and sections from another section. This
71 feature is mainly useful in swanctl.conf (which uses the same file format).
72 The syntax is as follows:
75 section := name : references { settings }
76 references := absname[, absname]*
77 absname := name[.name]*
80 All key/value pairs and all subsections of the referenced sections will be
81 inherited by the section that references them via their absolute name. Values
82 may be overridden in the section or any of its sub-sections (use an empty
83 assignment to clear a value so its default value, if any, will apply). It is
84 currently not possible to limit the inclusion level or clear/remove inherited
87 If the order is important (e.g. for auth rounds in a connection, if \fIround\fR
88 is not used), it should be noted that inherited settings/sections will follow
89 those defined in the current section (if multiple sections are referenced, their
90 settings are enumerated left to right).
92 References are evaluated dynamically at runtime, so referring to sections later
93 in the config file or included via other files is no problem.
95 Here is an example of how this might look like:
99 # default settings for all conns (e.g. a cert, or IP pools)
102 # defaults if eap is used (e.g. a remote auth round)
105 # defaults for child configs (e.g. traffic selectors)
108 conn-a : conn-defaults, eap-defaults {
109 # set/override stuff specific to this connection
111 child-a : child-defaults {
112 # set/override stuff specific to this child
116 conn-b : conn-defaults {
117 # set/override stuff specific to this connection
119 child-b : child-defaults {
120 # set/override stuff specific to this child
124 conn-c : connections.conn-a {
125 # everything is inherited, including everything conn-a
126 # already inherits from the sections it and its
127 # sub-section reference
136 statement it is possible to include other files into strongswan.conf, e.g.
139 include /some/path/*.conf
142 If the file name is not an absolute path, it is considered to be relative
143 to the directory of the file containing the include statement. The file name
144 may include shell wildcards (see
146 Also, such inclusions can be nested.
148 Sections loaded from included files
150 previously loaded sections; already existing values are
152 It is important to note that settings are added relative to the section the
153 include statement is in.
155 As an example, the following three files result in the same final
156 config as the one given above:
161 somevalue = before include
167 # settings loaded from this file are added to section-one
168 # the following replaces the previous value
176 # this extends section-one and subsection
179 # this replaces the previous value
189 Values are accessed using a dot-separated section list and a key.
190 With reference to the example above, accessing
191 .B section-one.subsection.othervalue
196 The following keys are currently defined (using dot notation). The default
197 value (if any) is listed in brackets after the key.