ipsec » History » Version 26
Tobias Brunner, 08.10.2014 15:31
1 | 12 | Martin Willi | h1. ipsec |
---|---|---|---|
2 | 1 | Martin Willi | |
3 | 24 | Tobias Brunner | {{>toc}} |
4 | 1 | Martin Willi | |
5 | 12 | Martin Willi | *ipsec* is actually an umbrella command comprising a collection of individual sub commands of the form |
6 | 1 | Martin Willi | |
7 | 13 | Tobias Brunner | p((. *ipsec _<command>_ [ _<argument>_ ] [ _<options>_ ]* |
8 | 12 | Martin Willi | |
9 | 1 | Martin Willi | that can be used to control and monitor IPsec connections as well as the IKE daemons. |
10 | 1 | Martin Willi | |
11 | 1 | Martin Willi | |
12 | 12 | Martin Willi | h2. Control Commands |
13 | 1 | Martin Willi | |
14 | 1 | Martin Willi | |
15 | 1 | Martin Willi | *ipsec start [ _<starter options>_ ]* |
16 | 15 | Daniel Mentz | |
17 | 19 | Tobias Brunner | p((. calls [[IpsecStarter|ipsec starter]] [ _<starter options>_ ] which in turn parses [[IpsecConf|ipsec.conf]] and starts the IKE daemon charon. |
18 | 12 | Martin Willi | |
19 | 12 | Martin Willi | *ipsec stop* |
20 | 15 | Daniel Mentz | |
21 | 19 | Tobias Brunner | p((. terminates all IPsec connection and stops the IKE daemon charon by sending a _TERM_ signal to [[IpsecStarter|ipsec starter]]. |
22 | 1 | Martin Willi | |
23 | 12 | Martin Willi | *ipsec restart [ _<starter options>_ ]* |
24 | 15 | Daniel Mentz | |
25 | 13 | Tobias Brunner | p((. is equivalent to *ipsec stop* followed by *ipsec start [ _<starter options>_ ]* after a guard period of 2 seconds. |
26 | 1 | Martin Willi | |
27 | 1 | Martin Willi | *ipsec update* |
28 | 15 | Daniel Mentz | |
29 | 19 | Tobias Brunner | p((. sends a _HUP_ signal to [[IpsecStarter|ipsec starter]] which in turn determines any changes in [[IpsecConf|ipsec.conf]] and updates the configuration on the running IKE daemon charon. Currently established connections are not affected by configuration changes. |
30 | 1 | Martin Willi | |
31 | 12 | Martin Willi | *ipsec reload* |
32 | 15 | Daniel Mentz | |
33 | 19 | Tobias Brunner | p((. sends a _USR1_ signal to [[IpsecStarter|ipsec starter]] which in turn reloads the whole configuration on the running IKE daemon charon based on the actual [[IpsecConf|ipsec.conf]]. Currently established connections are not affected by configuration changes. |
34 | 1 | Martin Willi | |
35 | 13 | Tobias Brunner | *ipsec up _<name>_* |
36 | 15 | Daniel Mentz | |
37 | 19 | Tobias Brunner | p((. tells the IKE daemon to start up connection _<name>_. Implemented by calling the [[IpsecStroke|ipsec stroke]] up _<name>_ command. |
38 | 12 | Martin Willi | |
39 | 13 | Tobias Brunner | *ipsec down _<name>_* |
40 | 15 | Daniel Mentz | |
41 | 19 | Tobias Brunner | p((. tells the IKE daemon to terminate connection _<name>_. Implemented by calling the [[IpsecStroke|ipsec stroke]] down _<name>_ command. |
42 | 12 | Martin Willi | |
43 | 16 | Daniel Mentz | *ipsec down _<name>{n}_* |
44 | 16 | Daniel Mentz | |
45 | 22 | Tobias Brunner | p((. terminates CHILD_SA instance n of connection <name>. Since _{n}_ uniquely identifis a CHILD_SA the name is optional. |
46 | 16 | Daniel Mentz | |
47 | 16 | Daniel Mentz | *ipsec down _<name>{<notextile>*</notextile>}_* |
48 | 16 | Daniel Mentz | |
49 | 19 | Tobias Brunner | p((. terminates all CHILD_SA instances of connection <name>. |
50 | 16 | Daniel Mentz | |
51 | 16 | Daniel Mentz | *ipsec down _<name>[n]_* |
52 | 1 | Martin Willi | |
53 | 22 | Tobias Brunner | p((. terminates IKE_SA instance n of connection <name> plus dependent CHILD_SAs. Since _[n]_ uniquely identifis an IKE_SA the name is optional. |
54 | 22 | Tobias Brunner | |
55 | 16 | Daniel Mentz | |
56 | 16 | Daniel Mentz | *ipsec down _<name>[<notextile>*</notextile>]_* |
57 | 16 | Daniel Mentz | |
58 | 19 | Tobias Brunner | p((. terminates all IKE_SA instances of connection <name>. |
59 | 16 | Daniel Mentz | |
60 | 13 | Tobias Brunner | *ipsec route _<name>_* |
61 | 15 | Daniel Mentz | |
62 | 19 | Tobias Brunner | p((. tells the IKE daemon to insert [[IpsecPolicy|IPsec policies]] in the kernel for connection _<name>_. The first payload packet matching the [[IpsecPolicy|IPsec policies]] will automatically trigger an IKE connection setup. Implemented by calling the [[IpsecStroke|ipsec stroke]] route _<name>_ command. |
63 | 1 | Martin Willi | |
64 | 13 | Tobias Brunner | *ipsec unroute _<name>_* |
65 | 15 | Daniel Mentz | |
66 | 19 | Tobias Brunner | p((. remove the [[IpsecPolicy|IPsec policies]] in the kernel for connection _<name>_. Implemented by calling the [[IpsecStroke|ipsec stroke]] unroute _<name>_ command. |
67 | 5 | Martin Willi | |
68 | 13 | Tobias Brunner | *ipsec status [ _<name>_ ]* |
69 | 15 | Daniel Mentz | |
70 | 19 | Tobias Brunner | p((. returns concise status information either on connection _<name>_ or if the argument is lacking, on all connections. Implemented by calling the [[IpsecStroke|ipsec stroke]] status [ _<name>_ ] command. |
71 | 13 | Tobias Brunner | |
72 | 12 | Martin Willi | *ipsec statusall [ _<name>_ ]* |
73 | 15 | Daniel Mentz | |
74 | 19 | Tobias Brunner | p((. returns detailed status information either on connection _<name>_ or if the argument is lacking, on all connections. Implemented by calling the [[IpsecStroke|ipsec stroke]] statusall [ _<name>_ ] command. |
75 | 12 | Martin Willi | |
76 | 1 | Martin Willi | |
77 | 1 | Martin Willi | h2. Info Commands |
78 | 12 | Martin Willi | |
79 | 1 | Martin Willi | *ipsec version* |
80 | 15 | Daniel Mentz | |
81 | 1 | Martin Willi | p((. returns the ipsec version in the form of *Linux strongSwan U<strongSwan userland version>/K<Linux kernel version>* if strongSwan uses the native NETKEY IPsec stack of the Linux kernel it is running on. |
82 | 1 | Martin Willi | |
83 | 1 | Martin Willi | *ipsec copyright* |
84 | 15 | Daniel Mentz | |
85 | 13 | Tobias Brunner | p((. returns the copyright information. |
86 | 1 | Martin Willi | |
87 | 12 | Martin Willi | *ipsec --confdir* |
88 | 15 | Daniel Mentz | |
89 | 13 | Tobias Brunner | p((. returns the _SYSCONFDIR_ directory as defined by the [[InstallationDocumentation|configure]] options. |
90 | 1 | Martin Willi | |
91 | 1 | Martin Willi | *ipsec --directory* |
92 | 15 | Daniel Mentz | |
93 | 13 | Tobias Brunner | p((. returns the _LIBEXECDIR_ directory as defined by the [[InstallationDocumentation|configure]] options. |
94 | 1 | Martin Willi | |
95 | 1 | Martin Willi | *ipsec --help* |
96 | 15 | Daniel Mentz | |
97 | 13 | Tobias Brunner | p((. returns the usage information for the ipsec command. |
98 | 1 | Martin Willi | |
99 | 1 | Martin Willi | *ipsec --versioncode* |
100 | 10 | Martin Willi | |
101 | 12 | Martin Willi | p((. returns the ipsec version number in the form of *U<strongSwan userland version>/K<Linux kernel version>* if strongSwan uses the native NETKEY IPsec stack of the Linux kernel it is running on. |
102 | 1 | Martin Willi | |
103 | 10 | Martin Willi | h2. List Commands |
104 | 1 | Martin Willi | |
105 | 26 | Tobias Brunner | *ipsec leases [ [ <poolname> [ <address> ] ]* |
106 | 26 | Tobias Brunner | |
107 | 26 | Tobias Brunner | p((. returns the status of all or the selected IP address pools (or even a single virtual IP address). |
108 | 26 | Tobias Brunner | |
109 | 13 | Tobias Brunner | *ipsec listaacerts [ --utc ]* |
110 | 1 | Martin Willi | |
111 | 19 | Tobias Brunner | p((. returns a list of X.509 Authorization Authority (AA) certificates that were loaded locally by the IKE daemon from the [[IpsecDirectoryAacerts|/etc/ipsec.d/aacerts]] directory. Implemented by calling the [[IpsecStroke|ipsec stroke]] listaacerts command. |
112 | 15 | Daniel Mentz | |
113 | 13 | Tobias Brunner | *ipsec listacerts [ --utc ]* |
114 | 1 | Martin Willi | |
115 | 21 | Tobias Brunner | p((. returns a list of X.509 Attribute certificates that were loaded locally by the IKE daemon from the [[IpsecDirectoryAcerts|/etc/ipsec.d/acerts]] directory. Implemented by calling the [[IpsecStroke|ipsec stroke]] listacerts command. |
116 | 1 | Martin Willi | |
117 | 21 | Tobias Brunner | *ipsec listalgs* |
118 | 21 | Tobias Brunner | |
119 | 21 | Tobias Brunner | p((. returns a list of all supported IKE encryption and hash algorithms, and the available Diffie-Hellman groups. Implemented by calling the [[IpsecStroke|ipsec stroke]] listalgs command. |
120 | 21 | Tobias Brunner | |
121 | 13 | Tobias Brunner | *ipsec listcacerts [ --utc ]* |
122 | 1 | Martin Willi | |
123 | 19 | Tobias Brunner | p((. returns a list of X.509 Certification Authority (CA) certificates that were loaded locally by the IKE daemon from the [[IpsecDirectoryCacerts|/etc/ipsec.d/cacerts]] directory or received via the IKE protocol. Implemented by calling the [[IpsecStroke|ipsec stroke]] listcacerts command. |
124 | 15 | Daniel Mentz | |
125 | 13 | Tobias Brunner | *ipsec listcainfos [ --utc ]* |
126 | 1 | Martin Willi | |
127 | 19 | Tobias Brunner | p((. returns Certification Authority information (CRL distribution points, OCSP URIs, LDAP servers) that were defined by [[CaSection|ca sections]] in [[IpsecConf|ipsec.conf]]. Implemented by calling the [[IpsecStroke|ipsec stroke]] listcainfos command. |
128 | 13 | Tobias Brunner | |
129 | 1 | Martin Willi | *ipsec listcerts [ --utc ]* |
130 | 1 | Martin Willi | |
131 | 1 | Martin Willi | p((. returns a list of X.509 and/or OpenPGP certificates that were either loaded locally by the IKE daemon or received via the IKE protocol. Implemented by calling the [[IpsecStroke|ipsec stroke]] listcerts command. |
132 | 1 | Martin Willi | |
133 | 25 | Tobias Brunner | *ipsec listcounters [ <name> ]* |
134 | 25 | Tobias Brunner | |
135 | 25 | Tobias Brunner | p((. returns a list of global or connection specific counter values about received and sent IKE messages and rekeyings. Connection specific ounters are available since [[5.0.3]]. Implemented by calling the [[IpsecStroke|ipsec stroke]] listcounters command. |
136 | 25 | Tobias Brunner | |
137 | 25 | Tobias Brunner | *ipsec listcrls [ --utc ]* |
138 | 25 | Tobias Brunner | |
139 | 25 | Tobias Brunner | p((. returns a list of Certificate Revocation Lists (CRLs) that were either loaded by the IKE daemon from the [[IpsecDirectoryCrls|/etc/ipsec.d/crls]] directory or fetched from an HTTP- or LDAP-based CRL distribution point. Implemented by calling the [[IpsecStroke|ipsec stroke]] listcrls command. |
140 | 25 | Tobias Brunner | |
141 | 13 | Tobias Brunner | *ipsec listgroups [ --utc ]* |
142 | 1 | Martin Willi | |
143 | 19 | Tobias Brunner | p((. returns a list of all groups that are used to define user authorization profiles. Currently not supported. |
144 | 15 | Daniel Mentz | |
145 | 13 | Tobias Brunner | *ipsec listocsp [ --utc ]* |
146 | 1 | Martin Willi | |
147 | 19 | Tobias Brunner | p((. returns cached revocation information fetched from OCSP servers. Implemented by calling the [[IpsecStroke|ipsec stroke]] listocsp command. |
148 | 15 | Daniel Mentz | |
149 | 18 | Tobias Brunner | *ipsec listocspcerts [ --utc ]* |
150 | 1 | Martin Willi | |
151 | 1 | Martin Willi | p((. returns a list of X.509 OCSP Signer certificates that were either loaded locally by the IKE daemon from the [[IpsecDirectoryOcspcerts|/etc/ipsec.d/ocspcerts]] directory or were sent by an OCSP server. Implemented by calling the [[IpsecStroke|ipsec stroke]] listocspcerts command. |
152 | 1 | Martin Willi | |
153 | 21 | Tobias Brunner | *ipsec listplugins* |
154 | 21 | Tobias Brunner | |
155 | 21 | Tobias Brunner | p((. returns a list of all loaded plugin features. Implemented by calling the [[IpsecStroke|ipsec stroke]] listplugins command. |
156 | 21 | Tobias Brunner | |
157 | 13 | Tobias Brunner | *ipsec listpubkeys [ --utc ]* |
158 | 2 | Martin Willi | |
159 | 25 | Tobias Brunner | p((. returns a list of public keys that were loaded in raw key format. Implemented by calling the [[IpsecStroke|ipsec stroke]] listpubkeys command. |
160 | 1 | Martin Willi | |
161 | 12 | Martin Willi | *ipsec listall [ --utc ]* |
162 | 19 | Tobias Brunner | |
163 | 18 | Tobias Brunner | p((. returns all information generated by the list commands above. Each list command can be called with the @--utc@ option which displays all dates in UTC instead of local time. Implemented by calling the [[IpsecStroke|ipsec stroke]] listall command. |
164 | 1 | Martin Willi | |
165 | 1 | Martin Willi | h2. Reread Commands |
166 | 12 | Martin Willi | |
167 | 1 | Martin Willi | *ipsec rereadaacerts* |
168 | 1 | Martin Willi | |
169 | 19 | Tobias Brunner | p((. reads all certificate files contained in the [[IpsecDirectoryAacerts|/etc/ipsec.d/aacerts]] directory and adds them to the list of Authorization Authority (AA) certificates. Implemented by calling the [[IpsecStroke|ipsec stroke]] rereadaacerts command. |
170 | 1 | Martin Willi | |
171 | 13 | Tobias Brunner | *ipsec rereadacerts* |
172 | 1 | Martin Willi | |
173 | 19 | Tobias Brunner | p((. reads all certificate files contained in the [[IpsecDirectoryAcerts|/etc/ipsec.d/acerts]] directory and adds them to the list of attribute certificates. Implemented by calling the [[IpsecStroke|ipsec stroke]] rereadacerts command. |
174 | 1 | Martin Willi | |
175 | 1 | Martin Willi | *ipsec rereadcacerts* |
176 | 1 | Martin Willi | |
177 | 19 | Tobias Brunner | p((. reads all certificate files contained in the [[IpsecDirectoryCacerts|/etc/ipsec.d/cacerts]] directory and adds them to the list of Certification Authority (CA) certificates. Implemented by calling the [[IpsecStroke|ipsec stroke]] rereadcacerts command. |
178 | 1 | Martin Willi | |
179 | 1 | Martin Willi | *ipsec rereadcrls* |
180 | 1 | Martin Willi | |
181 | 19 | Tobias Brunner | p((. reads all Certificate Revocation Lists (CRLs) contained in the [[IpsecDirectoryCrls|/etc/ipsec.d/crls]] directory and adds them to the list of CRLs. Older CRLs are replaced by newer ones. Implemented by calling the [[IpsecStroke|ipsec stroke]] rereadcrls command. |
182 | 1 | Martin Willi | |
183 | 1 | Martin Willi | *ipsec rereadocspcerts* |
184 | 15 | Daniel Mentz | |
185 | 19 | Tobias Brunner | p((. reads all certificate files contained in the [[IpsecDirectoryOcspcerts|/etc/ipsec.d/ocspcerts]] directory and adds them to the list of OCSP signer certificates. Implemented by calling the [[IpsecStroke|ipsec stroke]] rereadocspcerts command. |
186 | 1 | Martin Willi | |
187 | 12 | Martin Willi | *ipsec rereadsecrets* |
188 | 15 | Daniel Mentz | |
189 | 19 | Tobias Brunner | p((. flushes and rereads all secrets defined in [[IpsecSecrets|ipsec.secrets]]. Implemented by calling the [[IpsecStroke|ipsec stroke]] rereadsecrets command. |
190 | 1 | Martin Willi | |
191 | 12 | Martin Willi | *ipsec secrets* |
192 | 15 | Daniel Mentz | |
193 | 13 | Tobias Brunner | p((. is equivalent to *ipsec rereadsecrets*. |
194 | 1 | Martin Willi | |
195 | 1 | Martin Willi | *ipsec rereadall* |
196 | 1 | Martin Willi | |
197 | 1 | Martin Willi | p((. executes all reread commands listed above. Implemented by calling the [[IpsecStroke|ipsec stroke]] rereadall command. |
198 | 1 | Martin Willi | |
199 | 24 | Tobias Brunner | h2. Reset Commands |
200 | 24 | Tobias Brunner | |
201 | 24 | Tobias Brunner | *ipsec resetcounters [ <name> ]* |
202 | 24 | Tobias Brunner | |
203 | 24 | Tobias Brunner | p((. resets global or connection specific counters. Since [[5.0.3]]. Implemented by calling the [[IpsecStroke|ipsec stroke]] resetcounters command. |
204 | 1 | Martin Willi | |
205 | 15 | Daniel Mentz | h2. Purge Commands |
206 | 13 | Tobias Brunner | |
207 | 20 | Tobias Brunner | *ipsec purgecerts* |
208 | 20 | Tobias Brunner | |
209 | 20 | Tobias Brunner | p((. purges all cached certificates. Implemented by calling the [[IpsecStroke|ipsec stroke]] purgecerts command. |
210 | 20 | Tobias Brunner | |
211 | 20 | Tobias Brunner | *ipsec purgecrl* |
212 | 20 | Tobias Brunner | |
213 | 20 | Tobias Brunner | p((. purges all cached CRLs. Implemented by calling the [[IpsecStroke|ipsec stroke]] purgecrl command. |
214 | 20 | Tobias Brunner | |
215 | 12 | Martin Willi | *ipsec purgeike* |
216 | 1 | Martin Willi | |
217 | 20 | Tobias Brunner | p((. purges IKE_SAs that don't have a CHILD_SA. Implemented by calling the [[IpsecStroke|ipsec stroke]] purgeike command. |
218 | 13 | Tobias Brunner | |
219 | 1 | Martin Willi | *ipsec purgeocsp* |
220 | 1 | Martin Willi | |
221 | 19 | Tobias Brunner | p((. purges all cached OCSP information records. Implemented by calling the [[IpsecStroke|ipsec stroke]] purgeocsp command. |
222 | 1 | Martin Willi | |
223 | 19 | Tobias Brunner | |
224 | 19 | Tobias Brunner | |
225 | 19 | Tobias Brunner | h2. Before 5.0.0 |
226 | 19 | Tobias Brunner | |
227 | 19 | Tobias Brunner | In releases before [[5.0.0]] IKEv1 connections were handled by the separate [[pluto]] keying daemon. The ipsec command then used the [[IpsecWhack|ipsec whack]] in addition to the [[IpsecStroke|ipsec stroke]] command to communicate with pluto. |
228 | 19 | Tobias Brunner | |
229 | 19 | Tobias Brunner | h3. List Commands |
230 | 19 | Tobias Brunner | |
231 | 19 | Tobias Brunner | *ipsec listcards [ --utc ]* |
232 | 19 | Tobias Brunner | |
233 | 19 | Tobias Brunner | p((. lists all certificates found on attached smart cards. Supported by the IKEv1 pluto daemon only. Implemented by calling the [[IpsecWhack|ipsec whack]] --listcards command. |
234 | 19 | Tobias Brunner | |
235 | 19 | Tobias Brunner | h3. PKCS11 Proxy Commands |
236 | 1 | Martin Willi | |
237 | 12 | Martin Willi | *ipsec scencrypt _<value>_ [ --inbase _<base>_ ] [ --outbase _<base>_ ] [ --keyid _<id>_ ]* |
238 | 15 | Daniel Mentz | |
239 | 13 | Tobias Brunner | p((. Supported by the IKEv1 pluto daemon only. Implemented by calling the [[IpsecWhack|ipsec whack]] --scencrypt command. |
240 | 1 | Martin Willi | |
241 | 12 | Martin Willi | *ipsec scdecrypt _<value>_ [ --inbase <base> ] [ --outbase _<base>_ ] [ --keyid _<id>_ ]* |
242 | 15 | Daniel Mentz | |
243 | 13 | Tobias Brunner | p((. Supported by the IKEv1 pluto daemon only. Implemented by calling the [[IpsecWhack|ipsec whack]] --scdecrypt command. |