]> git.ipfire.org Git - thirdparty/strongswan.git/blame - conf/strongswan.conf.5.head.in
ike: Float to port 4500 if either port is 500
[thirdparty/strongswan.git] / conf / strongswan.conf.5.head.in
CommitLineData
c4bb26b8
TB
1.TH STRONGSWAN.CONF 5 "" "@PACKAGE_VERSION@" "strongSwan"
2.SH NAME
3strongswan.conf \- strongSwan configuration file
4.SH DESCRIPTION
5While the
6.IR ipsec.conf (5)
7configuration file is well suited to define IPsec related configuration
8parameters, it is not useful for other strongSwan applications to read options
9from this file.
10The file is hard to parse and only
11.I ipsec starter
12is capable of doing so. As the number of components of the strongSwan project
13is continually growing, a more flexible configuration file was needed, one that
14is easy to extend and can be used by all components. With strongSwan 4.2.1
15.IR strongswan.conf (5)
16was introduced which meets these requirements.
17
18.SH SYNTAX
19The format of the strongswan.conf file consists of hierarchical
20.B sections
21and a list of
22.B key/value pairs
23in each section. Each section has a name, followed by C-Style curly brackets
24defining the section body. Each section body contains a set of subsections
25and key/value pairs:
26.PP
27.EX
28 settings := (section|keyvalue)*
29 section := name { settings }
30 keyvalue := key = value\\n
31.EE
32.PP
33Values must be terminated by a newline.
34.PP
35Comments are possible using the \fB#\fP-character, but be careful: The parser
36implementation is currently limited and does not like brackets in comments.
37.PP
38Section names and keys may contain any printable character except:
39.PP
40.EX
41 . { } # \\n \\t space
42.EE
43.PP
44An example file in this format might look like this:
45.PP
46.EX
47 a = b
48 section-one {
49 somevalue = asdf
50 subsection {
51 othervalue = xxx
52 }
53 # yei, a comment
54 yetanother = zz
55 }
56 section-two {
57 x = 12
58 }
59.EE
60.PP
61Indentation is optional, you may use tabs or spaces.
62
63.SH INCLUDING FILES
64Using the
65.B include
66statement it is possible to include other files into strongswan.conf, e.g.
67.PP
68.EX
69 include /some/path/*.conf
70.EE
71.PP
72If the file name is not an absolute path, it is considered to be relative
73to the directory of the file containing the include statement. The file name
74may include shell wildcards (see
75.IR sh (1)).
76Also, such inclusions can be nested.
77.PP
78Sections loaded from included files
79.I extend
80previously loaded sections; already existing values are
81.IR replaced .
82It is important to note that settings are added relative to the section the
83include statement is in.
84.PP
85As an example, the following three files result in the same final
86config as the one given above:
87.PP
88.EX
89 a = b
90 section-one {
91 somevalue = before include
92 include include.conf
93 }
94 include other.conf
95
96include.conf:
97 # settings loaded from this file are added to section-one
98 # the following replaces the previous value
99 somevalue = asdf
100 subsection {
101 othervalue = yyy
102 }
103 yetanother = zz
104
105other.conf:
106 # this extends section-one and subsection
107 section-one {
108 subsection {
109 # this replaces the previous value
110 othervalue = xxx
111 }
112 }
113 section-two {
114 x = 12
115 }
116.EE
117
118.SH READING VALUES
119Values are accessed using a dot-separated section list and a key.
120With reference to the example above, accessing
121.B section-one.subsection.othervalue
122will return
123.BR xxx .
124
125.SH DEFINED KEYS
126The following keys are currently defined (using dot notation). The default
127value (if any) is listed in brackets after the key.