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 .SH REFERENCING OTHER SECTIONS
64 It is possible to inherit settings and sections from another section. This
65 feature is mainly useful in swanctl.conf (which uses the same file format).
66 The syntax is as follows:
69 section := name : references { settings }
70 references := absname[, absname]*
71 absname := name[.name]*
74 All key/value pairs and all subsections of the referenced sections will be
75 inherited by the section that references them via their absolute name. Values
76 may be overridden in the section or any of its sub-sections (use an empty
77 assignment to clear a value so its default value, if any, will apply). It is
78 currently not possible to limit the inclusion level or clear/remove inherited
81 If the order is important (e.g. for auth rounds in a connection, if \fIround\fR
82 is not used), it should be noted that inherited settings/sections will follow
83 those defined in the current section (if multiple sections are referenced, their
84 settings are enumerated left to right).
86 References are evaluated dynamically at runtime, so referring to sections later
87 in the config file or included via other files is no problem.
89 Here is an example of how this might look like:
93 # default settings for all conns (e.g. a cert, or IP pools)
96 # defaults if eap is used (e.g. a remote auth round)
99 # defaults for child configs (e.g. traffic selectors)
102 conn-a : conn-defaults, eap-defaults {
103 # set/override stuff specific to this connection
105 child-a : child-defaults {
106 # set/override stuff specific to this child
110 conn-b : conn-defaults {
111 # set/override stuff specific to this connection
113 child-b : child-defaults {
114 # set/override stuff specific to this child
118 conn-c : connections.conn-a {
119 # everything is inherited, including everything conn-a
120 # already inherits from the sections it and its
121 # sub-section reference
130 statement it is possible to include other files into strongswan.conf, e.g.
133 include /some/path/*.conf
136 If the file name is not an absolute path, it is considered to be relative
137 to the directory of the file containing the include statement. The file name
138 may include shell wildcards (see
140 Also, such inclusions can be nested.
142 Sections loaded from included files
144 previously loaded sections; already existing values are
146 It is important to note that settings are added relative to the section the
147 include statement is in.
149 As an example, the following three files result in the same final
150 config as the one given above:
155 somevalue = before include
161 # settings loaded from this file are added to section-one
162 # the following replaces the previous value
170 # this extends section-one and subsection
173 # this replaces the previous value
183 Values are accessed using a dot-separated section list and a key.
184 With reference to the example above, accessing
185 .B section-one.subsection.othervalue
190 The following keys are currently defined (using dot notation). The default
191 value (if any) is listed in brackets after the key.