ipsec_auto (8) Linux Manual Page
ipsec_auto – control automatically-keyed IPsec connections
Synopsis
-
ipsecauto [–showonly] [–asynchronous] - [–config
configfile] [–verbose] operation connection ipsecauto [–showonly] [–asynchronous]- [–config
configfile] [–verbose] operation connection Examples
-
ipsecauto {–add | –delete | –replace | –start } connection ipsecauto {–up | –down } connection ipsecauto {–route | –unroute } connection ipsecauto {–status | –ready } ipsecauto [–utc] [–listall | –rereadall] [–rereadsecrets] [–listcerts] [–listpubkeys] [–checkpubkeys] [–listcacerts] [–listcrls | –rereadcrls] [–listgroups | –rereadgroups] [–purgeocsp]
Description
Auto
- manipulates automatically-keyed Libreswan IPsec connections, setting them up and shutting them down based on the information in the IPsec configuration file. In the normal usage, connection is the name of a connection specification in the configuration file; operation is
–add,–delete,–replace,–start,–up,–down,–route, or–unroute. The–ready,–rereadsecrets,–rereadgroups, and–statusoperations do not take a connection name. Auto generates suitable commands and feeds them to a shell for execution.The
–addoperation adds a connection specification to the internal database within pluto; it will fail if pluto already has a specification by that name. The–deleteoperation deletes a connection specification from pluto‘s internal database (also tearing down any connections based on it); The–replaceoperation is equivalent to–delete(if there is already a loaded connection by the given name) followed by–add, and is a convenience for updating pluto‘s internal specification to match an external one. (Note that a–rereadsecretsmay also be needed.) The–startoperation is equivalent to running first with–addand then with–up, causing same effect as connection configuration optionauto=start. The–rereadgroupsoperation causes any changes to the policy group files to take effect (this is currently a synonym for–ready, but that may change). None of the other operations alters the internal database.The
–upoperation asks pluto to establish a connection based on an entry in its internal database. The–downoperation tells pluto to tear down such a connection.Normally, pluto establishes a route to the destination specified for a connection as part of the
–upoperation. However, the route (for KLIPS) and packet capture (KLIPS and NETKEY) can be established with the–routeoperation. Until and unless an actual connection is established, this discards any packets sent there, which may be preferable to having them sent elsewhere based on a more general route (e.g., a default route).Normally, pluto‘s route (KLIPS) or packet capture (NETKEY) to a destination remains in place when a
–downoperation is used to take the connection down (or if connection setup, or later automatic rekeying, fails). This permits establishing a new connection (perhaps using a different specification; the route is altered as necessary) without having a “window” in which packets might go elsewhere based on a more general route. Such a route can be removed using the–unrouteoperation (and is implicitly removed by–delete).The
–readyoperation tells pluto to listen for connection-setup requests from other hosts. Doing an–upoperation before doing–readyon both ends is futile and will not work, although this is now automated as part of IPsec startup and should not normally be an issue.The
–statusoperation asks pluto for current connection status. The output format is ad-hoc and likely to change.The
–rereadsecretsoperation tells pluto to re-read the /etc/ipsec.secrets secret-keys file, which it normally reads only at startup time. (This is currently a synonym for–ready, but that may change.)The
–rereadsecretsoperation tells pluto to re-read the /etc/ipsec.secrets secret-keys file, which it normally reads only at startup time. (This is currently a synonym for–ready,but that may change.)The
–rereadcrlsoperation reads all certificate revocation list (CRL) files contained in the /etc/ipsec.d/crls directory and adds them to pluto’s list of CRLs. Note CRLs can and should be stored inside NSS instead of in the /etc/ipsec.d/crls directory which will result in automatic updates. This option will be obsoleted in the near future.The
–rereadalloperation is equivalent to the execution of –rereadsecrets and –rereadcrls.The
–listpubkeysoperation lists all RSA public keys either received from peers via the IKE protocol embedded in authenticated certificate payloads or loaded locally using the rightcert / leftcert or rightr- sasigkey / leftrsasigkey parameters in ipsec.conf(5).The
–listcertsoperation lists all X.509 certificates loaded locally using the rightcert and leftcert parameters in ipsec.conf(5). To see all certificates in the NSS database, usecertutil -d /etc/ipsec.d -L.The
–checkpubkeysoperation lists all loaded X.509 certificates which are about to expire or have been expired.The
–listcacertsoperation lists all X.509 CA certificates contained in the NSS database.The
–listgroupsoperation lists all groups that are either used in connection definitions in ipsec.conf(5) or are embedded in loaded X.509 attributes certificates.The
–listcrlsoperation lists all Certificate Revocation Lists (CRLs) either loaded locally from the /etc/ipsec.d/crls directory or fetched dynamically from an HTTP or LDAP server.The
–listalloperation is equivalent to the execution of –listpubkeys, –listcerts, –listcacerts, –listgroups, –listcrls.The
–purgeocspoperation displays –listall and purges the NSS OCSP cache.The
–showonlyoption causes auto to show the commands it would run, on standard output, and not run them.The
–asynchronousoption, applicable only to theupoperation, tells pluto to attempt to establish the connection, but does not delay to report results. This is especially useful to start multiple connections in parallel when network links are slow.The
–verboseoption instructs auto to pass through all output fromipsec_whack(8), including log output that is normally filtered out as uninteresting.The
–configoption specifies a non-standard location for the IPsec configuration file (default /etc/ipsec.conf).See
ipsec.conf(5) for details of the configuration file.Files
-
/etc/ipsec.conf default IPSEC configuration file /etc/ipsec.d X.509 and Opportunistic Encryption files /var/run/pluto/pluto.ctl Pluto command socket
See Also
ipsec.conf(5),ipsec(8),ipsec_pluto(8),ipsec_whack(8)History
Originally written for the FreeS/WAN project <m[blue]
http://www.freeswan.orgm[]> by Henry Spencer.Bugs
Although an
–upoperation does connection setup on both ends,–downtears only one end of the connection down (although the orphaned end will eventually time out).There is no support for
passthroughconnections.A connection description which uses
%defaultroutefor one of itsnexthopparameters but not the other may be falsely rejected as erroneous in some circumstances.The exit status of
–showonlydoes not always reflect errors discovered during processing of the request. (This is fine for human inspection, but not so good for use in scripts.)Author
Paul Wouters- placeholder to suppress warning
