ipsec.conf Reference » History » Version 20
Andreas Steffen, 12.08.2016 09:25
Moved IKE cipher suites
1 | 16 | Tobias Brunner | {{title(ipsec.conf Reference)}} |
---|---|---|---|
2 | 16 | Tobias Brunner | |
3 | 12 | Andreas Steffen | h1. ipsec.conf |
4 | 1 | Martin Willi | |
5 | 1 | Martin Willi | |
6 | 12 | Andreas Steffen | strongSwan's _/etc/ipsec.conf_ configuration file consists of three different section types: |
7 | 1 | Martin Willi | |
8 | 12 | Andreas Steffen | * [[ConfigSetupSection|config setup]] defines general configuration parameters |
9 | 12 | Andreas Steffen | * [[ConnSection|conn <name>]] defines a connection |
10 | 12 | Andreas Steffen | * [[CaSection|ca <name>]] defines a certification authority |
11 | 12 | Andreas Steffen | |
12 | 18 | Tobias Brunner | There can be only one [[ConfigSetupSection|config setup]] section but an unlimited number of [[ConnSection|conn]] and [[CaSection|ca]] sections. |
13 | 12 | Andreas Steffen | |
14 | 3 | Martin Willi | All parameters belonging to a section must be indented by at least one space or tab |
15 | 4 | Martin Willi | character. The rest of the line after a '#' character is treated as a comment. |
16 | 4 | Martin Willi | Comments within a section must also be indented. |
17 | 4 | Martin Willi | |
18 | 15 | Tobias Brunner | A line which contains *include* followed by a file name is replaced by the contents |
19 | 15 | Tobias Brunner | of that file. If the file name is not a full pathname, it is considered to be relative |
20 | 1 | Martin Willi | to the directory containing the including file. Such inclusions can be nested. The file |
21 | 1 | Martin Willi | name may include wildcards, for example: @include ipsec.*.conf@ |
22 | 18 | Tobias Brunner | |
23 | 18 | Tobias Brunner | h2. Reusing Existing Parameters |
24 | 18 | Tobias Brunner | |
25 | 18 | Tobias Brunner | All [[ConnSection|conn]] and [[CaSection|ca]] sections inherit the parameters defined in a @conn %default@ |
26 | 18 | Tobias Brunner | or @ca %default@ section, respectively. |
27 | 18 | Tobias Brunner | |
28 | 18 | Tobias Brunner | Parameters defined in other [[ConnSection|conn]] or [[CaSection|ca]] sections may be included in a section |
29 | 19 | Tobias Brunner | with the @also=othersection@ parameter. The included section may in turn use the |
30 | 19 | Tobias Brunner | _also_ keyword to include other sections. |
31 | 1 | Martin Willi | |
32 | 19 | Tobias Brunner | In versions prior to version:5.2.0 each setting could only be defined once, so settings included |
33 | 19 | Tobias Brunner | via _also_ could not be changed (the only exception were settings defined in the _%default_ |
34 | 19 | Tobias Brunner | section, which could be overwritten once). |
35 | 19 | Tobias Brunner | Since version:5.2.0 settings from included sections may be changed - the same setting may |
36 | 19 | Tobias Brunner | even be defined multiple times in the same section, the last value will be used. It does |
37 | 19 | Tobias Brunner | not matter if settings are defined before or after an _also_ statement, settings in the current |
38 | 19 | Tobias Brunner | section always override inherited settings. But if multiple _also_ statements are used in the |
39 | 19 | Tobias Brunner | same section their order matters (settings from a section included later will override those |
40 | 19 | Tobias Brunner | from previously included sections). The new parser also allows to unset a setting by |
41 | 19 | Tobias Brunner | assigning no value (e.g. @leftcert=@), the setting's default value, if any, will apply, which |
42 | 19 | Tobias Brunner | may be used to "remove" settings inherited from e.g. the _%default_ section. |
43 | 12 | Andreas Steffen | |
44 | 12 | Andreas Steffen | h2. Example |
45 | 12 | Andreas Steffen | |
46 | 12 | Andreas Steffen | <pre> |
47 | 9 | Martin Willi | # /etc/ipsec.conf - strongSwan IPsec configuration file |
48 | 9 | Martin Willi | |
49 | 8 | Martin Willi | config setup |
50 | 8 | Martin Willi | cachecrls=yes |
51 | 8 | Martin Willi | strictcrlpolicy=yes |
52 | 8 | Martin Willi | |
53 | 10 | Martin Willi | ca strongswan #define alternative CRL distribution point |
54 | 8 | Martin Willi | cacert=strongswanCert.pem |
55 | 8 | Martin Willi | crluri=http://crl2.strongswan.org/strongswan.crl |
56 | 8 | Martin Willi | auto=add |
57 | 8 | Martin Willi | |
58 | 8 | Martin Willi | conn %default |
59 | 1 | Martin Willi | keyingtries=1 |
60 | 1 | Martin Willi | keyexchange=ikev2 |
61 | 1 | Martin Willi | |
62 | 1 | Martin Willi | conn roadwarrior |
63 | 8 | Martin Willi | leftsubnet=10.1.0.0/16 |
64 | 8 | Martin Willi | leftcert=moonCert.pem |
65 | 8 | Martin Willi | leftid=@moon.strongswan.org |
66 | 8 | Martin Willi | right=%any |
67 | 8 | Martin Willi | auto=add |
68 | 12 | Andreas Steffen | </pre> |