'\" t .\" Title: IPSEC.CONF .\" Author: Paul Wouters .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 05/13/2020 .\" Manual: Executable programs .\" Source: libreswan .\" Language: English .\" .TH "IPSEC\&.CONF" "5" "05/13/2020" "libreswan" "Executable programs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ipsec.conf \- IPsec configuration and connections .SH "DESCRIPTION" .PP The \fIipsec\&.conf\fR file specifies most configuration and control information for the Libreswan IPsec subsystem\&. (The major exception is secrets for authentication; see \fBipsec.secrets\fR(5)\&.) Its contents are not security\-sensitive\&. Configurations can be added using this configuration file or by using ipsec whack directly\&. This means that technically, the ipsec\&.conf file is optional, but a few warnings might show up when this file is missing\&. .PP \fIipsec\&.conf\fR is a text file, consisting of one or more \fIsections\fR\&. White space followed by \fB#\fR followed by anything to the end of the line is a comment and is ignored, as are empty lines that are not within a section\&. .PP A line that contains \fBinclude\fR and a file name, separated by white space, is replaced by the contents of that file, preceded and followed by empty lines\&. If the file name is not a full pathname, it is considered to be relative to the directory that contains the including file\&. Such inclusions can be nested\&. Only a single filename may be supplied, and it may not contain white space, but it may include shell wildcards (see \fBsh\fR(1)); for example: .PP \fBinclude \fR \fB/etc/ipsec\&.d/*\&.conf\fR .PP The intention of the include facility is mostly to permit keeping information on connections, or sets of connections, separate from the main configuration file\&. This permits such connection descriptions to be changed, copied to the other security gateways involved, etc\&., without having to constantly extract them from the configuration file and then insert them back into it\&. Note also the \fBalso\fR and \fBalsoflip\fR parameters (described below) which permit splitting a single logical section (e\&.g\&. a connection description) into several distinct sections\&. .PP The first significant line of the file may specify a version of this specification for backwards compatibility with freeswan and openswan\&. It is ignored and unused\&. For compatibility with openswan, specify: .PP \fBversion 2\fR .PP A section begins with a line of the form: .PP \fItype\fR\ \&\fIname\fR .PP where \fItype\fR indicates what type of section follows, and \fIname\fR is an arbitrary name that distinguishes the section from others of the same type\&. (Names must start with a letter and may contain only letters, digits, periods, underscores, and hyphens\&.) All subsequent non\-empty lines that begin with white space are part of the section; comments within a section must begin with white space too\&. There may be only one section of a given type with a given name\&. .PP Lines within the section are generally of the form .PP \ \&\ \&\ \&\ \&\ \&\fIparameter\fR\fB=\fR\fIvalue\fR .PP (note the mandatory preceding white space)\&. There can be white space on either side of the \fB=\fR\&. Parameter names follow the same syntax as section names, and are specific to a section type\&. Unless otherwise explicitly specified, no parameter name may appear more than once in a section\&. .PP An empty \fIvalue\fR stands for the system default value (if any) of the parameter, i\&.e\&. it is roughly equivalent to omitting the parameter line entirely\&. A \fIvalue\fR may contain white space only if the entire \fIvalue\fR is enclosed in double quotes (\fB"\fR); a \fIvalue\fR cannot itself contain a double quote, nor may it be continued across more than one line\&. .PP Numeric values are specified to be either an \(lqinteger\(rq (a sequence of digits) or a \(lqdecimal number\(rq (sequence of digits optionally followed by `\&.\*(Aq and another sequence of digits)\&. .PP There is currently one parameter that is available in any type of section: .PP \fBalso\fR .RS 4 the value is a section name; the parameters of that section are appended to this section, as if they had been written as part of it\&. The specified section must exist, must follow the current one, and must have the same section type\&. (Nesting is permitted, and there may be more than one \fBalso\fR in a single section, although it is forbidden to append the same section more than once\&.) This allows, for example, keeping the encryption keys for a connection in a separate file from the rest of the description, by using both an \fBalso\fR parameter and an \fBinclude\fR line\&. (Caution, see BUGS below for some restrictions\&.) .RE .PP \fBalsoflip\fR .RS 4 can be used in a \fBconn\fR section\&. It acts like an \fBalso\fR that flips the referenced section\*(Aqs entries left\-for\-right\&. .RE .PP Parameter names beginning with \fBx\-\fR (or \fBX\-\fR, or \fBx_\fR, or \fBX_\fR) are reserved for user extensions and will never be assigned meanings by IPsec\&. Parameters with such names must still observe the syntax rules (limits on characters used in the name; no white space in a non\-quoted value; no newlines or double quotes within the value)\&. All other as\-yet\-unused parameter names are reserved for future IPsec improvements\&. .PP A section with name \fB%default\fR specifies defaults for sections of the same type\&. For each parameter in it, any section of that type that does not have a parameter of the same name gets a copy of the one from the \fB%default\fR section\&. There may be multiple \fB%default\fR sections of a given type, but only one default may be supplied for any specific parameter name\&. \fB%default\fR sections may not contain \fBalso\fR or \fBalsoflip\fR parameters\&. .PP Currently there are two types of section: a \fBconfig\fR section specifies general configuration information for IPsec, while a \fBconn\fR section specifies an IPsec connection\&. .SH "CONN SECTIONS" .PP A \fBconn\fR section contains a \fIconnection specification\fR, defining a network connection to be made using IPsec\&. The name given is arbitrary, and is used to identify the connection to \fBipsec_auto\fR(8) Here\*(Aqs a simple example: .sp .if n \{\ .RS 4 .\} .nf \fB conn snt left=10\&.11\&.11\&.1 leftsubnet=10\&.0\&.1\&.0/24 leftnexthop=172\&.16\&.55\&.66 leftsourceip=10\&.0\&.1\&.1 right=192\&.168\&.22\&.1 rightsubnet=10\&.0\&.2\&.0/24 rightnexthop=172\&.16\&.88\&.99 rightsourceip=10\&.0\&.2\&.1 keyingtries=%forever \fR .fi .if n \{\ .RE .\} .PP A note on terminology\&.\&.\&. In automatic keying, there are two kinds of communications going on: transmission of user IP packets, and gateway\-to\-gateway negotiations for keying, rekeying, and general control\&. The data path (a set of \(lqIPsec SAs\(rq) used for user packets is herein referred to as the \(lqconnection\(rq; the path used for negotiations (built with \(lqISAKMP SAs\(rq) is referred to as the \(lqkeying channel\(rq\&. .PP To avoid trivial editing of the configuration file to suit it to each system involved in a connection, connection specifications are written in terms of \fIleft\fR and \fIright\fR participants, rather than in terms of local and remote\&. Which participant is considered \fIleft\fR or \fIright\fR is arbitrary; IPsec figures out which one it is being run on based on internal information\&. This permits using identical connection specifications on both ends\&. There are cases where there is no symmetry; a good convention is to use \fIleft\fR for the local side and \fIright\fR for the remote side (the first letters are a good mnemonic)\&. .PP Many of the parameters relate to one participant or the other; only the ones for \fIleft\fR are listed here, but every parameter whose name begins with \fBleft\fR has a \fBright\fR counterpart, whose description is the same but with \fBleft\fR and \fBright\fR reversed\&. .PP Parameters are optional unless marked \(lq(required)\(rq .SS "CONN PARAMETERS: GENERAL" .PP The following parameters are relevant to IKE automatic keying\&. Unless otherwise noted, for a connection to work, in general it is necessary for the two ends to agree exactly on the values of these parameters\&. .PP \fBkeyexchange\fR .RS 4 method of key exchange; the default and currently the only accepted value is \fBike\fR .RE .PP \fBhostaddrfamily\fR .RS 4 the address family of the hosts; currently the accepted values are \fBipv4\fR and \fBipv6\fR\&. The default is to detect this based on the IP addresses specified or the IP addresses resolved, so this option is not needed, unless you specify hostnames that resolve to both IPv4 and IPv6\&. This option used to be named connaddrfamily but its use was broken so it was obsoleted in favour or using the new hostaddrfamily and clientaddrfamily\&. .RE .PP \fBclientaddrfamily\fR .RS 4 the address family of the clients (subnets); currently the accepted values are \fBipv4\fR and \fBipv6\fR\&. The default is to detect this based on the network IP addresses specified or the network IP addresses resolved, so this option is not needed, unless you specify names that resolve to both IPv4 and IPv6\&. .RE .PP \fBtype\fR .RS 4 the type of the connection; currently the accepted values are \fBtunnel\fR (the default) signifying a host\-to\-host, host\-to\-subnet, or subnet\-to\-subnet tunnel; \fBtransport\fR, signifying host\-to\-host transport mode; \fBpassthrough\fR, signifying that no IPsec processing should be done at all; \fBdrop\fR, signifying that packets should be discarded; and \fBreject\fR, signifying that packets should be discarded and a diagnostic ICMP returned\&. .RE .PP \fBleft\fR .RS 4 (required) the IP address of the left participant\*(Aqs public\-network interface, Currently, IPv4 and IPv6 IP addresses are supported\&. There are several magic values\&. If it is \fB%defaultroute\fR, and the \fBconfig setup\fR section\*(Aqs, \fBinterfaces\fR specification contains \fB%defaultroute\fR, \fBleft\fR will be filled in automatically with the local address of the default\-route interface (as determined at IPsec startup time); this also overrides any value supplied for \fBleftnexthop\fR\&. (Either \fBleft\fR or \fBright\fR may be \fB%defaultroute\fR, but not both\&.) The value \fB%any\fR signifies an address to be filled in (by automatic keying) during negotiation\&. The value \fB%opportunistic\fR signifies that both \fBleft\fR and \fBleftnexthop\fR are to be filled in (by automatic keying) from DNS data for \fBleft\fR\*(Aqs client\&. The value can also contain the interface name, which will then later be used to obtain the IP address from to fill in\&. For example \fB%ppp0\fR The values \fB%group\fR and \fB%opportunisticgroup\fR makes this a policy group conn: one that will be instantiated into a regular or opportunistic conn for each CIDR block listed in the policy group file with the same name as the conn\&. .sp If using IP addresses in combination with NAT, always use the actual local machine\*(Aqs (NATed) IP address, and if the remote (eg right=) is NATed as well, the remote\*(Aqs public (\fBnot\fR NATed) IP address\&. Note that this makes the configuration no longer symmetrical on both sides, so you cannot use an identical configuration file on both hosts\&. .RE .PP \fBleftsubnet\fR .RS 4 private subnet behind the left participant, expressed as \fInetwork\fR\fB/\fR\fInetmask\fR (actually, any form acceptable to \fBipsec_ttosubnet\fR(3)); Currently, IPv4 and IPv6 ranges are supported\&. if omitted, essentially assumed to be \fIleft\fR/32, signifying that the left end of the connection goes to the left participant only .sp It supports two magic shorthands \fIvhost:\fR and \fIvnet:\fR, which can list subnets in the same syntax as \fIvirtual\-private\fR\&. The value \fI%priv\fR expands to the networks specified in \fIvirtual\-private\fR\&. The value \fI%no\fR means no subnet\&. A common use for allowing roadwarriors to come in on public IPs or via accepted NATed networks from RFC1918 is to use \fIleftsubnet=vhost:%no,%priv\fR\&. The \fIvnet:\fR option can be used to allow RFC1918 subnets without hardcoding them\&. When using vnet the connection will instantiate, allowing for multiple tunnels with different subnets\&. .RE .PP \fBleftsubnets\fR .RS 4 specify multiple private subnets behind the left participant, expressed as { \fInetworkA\fR\fB/\fR\fInetmaskA\fR, \fInetworkB\fR\fB/\fR\fInetmaskB\fR \fI[\&.\&.\&.]\fR } If both a leftsubnets= and rightsubnets= are defined, all combinations of subnet tunnels will be established as IPsec tunnels\&. You cannot use leftsubnet= and leftsubnets= together\&. For examples see \fItesting/pluto/multinet\-*\fR\&. .RE .PP \fBleftvti\fR .RS 4 the address/mask to configure on the VTI interface when \fIvti\-interface\fR is set\&. It takes the form of \fInetwork\fR\fB/\fR\fInetmask\fR (actually, any form acceptable to \fBipsec_ttosubnet\fR(3)); Currently, IPv4 and IPv6 ranges are supported\&. This option is often used in combination with routed based VPNs\&. .RE .PP \fBleftaddresspool\fR .RS 4 address pool from with the IKEv1 XAUTH or IKEv2 server can assign IP addresses to clients\&. When configured as a server, using \fIleftxauthserver=yes\fR this option specifies the address pool from which IP addresses are taken to assign the clients\&. The syntax of the address pool specifies a range (not a CIDR), in the following syntax: \fIrightaddresspool=192\&.168\&.1\&.100\-192\&.168\&.1\&.200\fR\&. Generally, the \fIrightaddresspool=\fR option will be accompanied by \fIrightxauthclient=yes\fR, \fIleftxauthserver=yes\fR and \fIleftsubnet=0\&.0\&.0\&.0/0\fR option\&. .sp When \fIleftaddresspool=\fR is specified, the connection may not specify either \fIleftsubnet=\fR or \fIleftsubnets=\fR\&. Address pools are fully allocated when the connection is loaded, so the ranges should be sane\&. For example, specifying a range \fIrightaddresspool=10\&.0\&.0\&.0\-11\&.0\&.0\&.0\fR will lead to massive memory allocation\&. Address pools specifying the exact same range are shared between different connections\&. Different addresspools should not be defined to partially overlap\&. .RE .PP \fBleftprotoport\fR .RS 4 allowed protocols and ports over connection, also called Port Selectors\&. The argument is in the form \fIprotocol\fR, which can be a number or a name that will be looked up in \fI/etc/protocols\fR, such as \fIleftprotoport=icmp\fR, or in the form of \fIprotocol/port\fR, such as \fItcp/smtp\fR\&. Ports can be defined as a number (eg\&. 25) or as a name (eg smtp) which will be looked up in \fI/etc/services\fR\&. A special keyword \fI%any\fR can be used to allow all ports of a certain protocol\&. The most common use of this option is for L2TP connections to only allow l2tp packets (UDP port 1701), eg: \fIleftprotoport=17/1701\fR\&. .sp To filter on specific icmp type and code, use the higher 8 bits for type and the lower 8 bits for port\&. For example, to allow icmp echo packets (type 8, code 0) the \*(Aqport\*(Aq would be 0x0800, or 2048 in decimal, so you configure \fIleftprotoport=icmp/2048\fR\&. Similarly, to allow ipv6\-icmp Neighbour Discovery which has type 136 (0x88) and code 0(0x00) this becomes 0x8800 or in decimal 34816 resulting in \fIleftprotoport=ipv6\-icmp/34816\fR \&. .sp Some clients, notably older Windows XP and some Mac OSX clients, use a random high port as source port\&. In those cases \fIrightprotoport=17/%any\fR can be used to allow all UDP traffic on the connection\&. Note that this option is part of the proposal, so it cannot be arbitrarily left out if one end does not care about the traffic selection over this connection \- both peers have to agree\&. The Port Selectors show up in the output of \fIipsec eroute\fR and \fIipsec auto \-\-status\fR eg:\fI"l2tp": 193\&.110\&.157\&.131[@aivd\&.libreswan\&.org]:7/1701\&.\&.\&.%any:17/1701\fR This option only filters outbound traffic\&. Inbound traffic selection must still be based on firewall rules activated by an updown script\&. The variables $PLUTO_MY_PROTOCOL, $PLUTO_PEER_PROTOCOL, $PLUTO_MY_PORT, and $PLUTO_PEER_PORT are available for use in \fIupdown\fR scripts\&. Older workarounds for bugs involved a setting of \fI17/0\fR to denote \fIany single UDP port\fR (not UDP port 0)\&. Some clients, most notably OSX, uses a random high port, instead of port 1701 for L2TP\&. .RE .PP \fBleftnexthop\fR .RS 4 next\-hop gateway IP address for the left participant\*(Aqs connection to the public network; defaults to \fB%direct\fR (meaning \fIright\fR)\&. If the value is to be overridden by the \fBleft=%defaultroute\fR method (see above), an explicit value must \fInot\fR be given\&. If that method is not being used, but \fBleftnexthop\fR is \fB%defaultroute\fR, and \fBinterfaces=%defaultroute\fR is used in the \fBconfig setup\fR section, the next\-hop gateway address of the default\-route interface will be used\&. The magic value \fB%direct\fR signifies a value to be filled in (by automatic keying) with the peer\*(Aqs address\&. Relevant only locally, other end need not agree on it\&. .RE .PP \fBleftsourceip\fR .RS 4 the IP address for this host to use when transmitting a packet to the other side of this link\&. Relevant only locally, the other end need not agree\&. This option is used to make the gateway itself use its internal IP, which is part of the leftsubnet, to communicate to the rightsubnet or right\&. Otherwise, it will use its \fBnearest\fR IP address, which is its public IP address\&. This option is mostly used when defining subnet\-subnet connections, so that the gateways can talk to each other and the subnet at the other end, without the need to build additional host\-subnet, subnet\-host and host\-host tunnels\&. Both IPv4 and IPv6 addresses are supported\&. .RE .PP \fBleftupdown\fR .RS 4 what "updown" script to run to adjust routing and/or firewalling when the status of the connection changes (default \fBipsec _updown\fR)\&. May include positional parameters separated by white space (although this requires enclosing the whole string in quotes); including shell metacharacters is unwise\&. An example to enable routing when using the NETKEY stack, one can use: .sp leftupdown="ipsec _updown \-\-route yes" .sp To disable calling an updown script, set it to the empty string, eg leftupdown="" or leftupdown="%disabled"\&. .sp See \fBipsec_pluto\fR(8) for details\&. Relevant only locally, other end need not agree on it\&. .RE .PP \fBleftcat\fR .RS 4 Whether to perform Client Address Translation ("CAT") when using Opportunistic IPsec behind NAT\&. Accepted values are \fBno\fR (the default) and \fByes\fR\&. This option should only be enabled on the special Opportunistic IPsec connections, usually called "private" and "private\-or\-clear"\&. When set, this option causes the given addresspool IP from the remote peer to be NATed with iptables\&. It will also install an additional IPsec SA policy to cover the pre\-NAT IP\&. See the Opportunistic IPsec information on the libreswan website for more information and examples\&. .RE .PP \fBleftfirewall\fR .RS 4 This option is obsolete and should not used anymore\&. .RE .PP If one or both security gateways are doing forwarding firewalling (possibly including masquerading), and this is specified using the firewall parameters, tunnels established with IPsec are exempted from it so that packets can flow unchanged through the tunnels\&. (This means that all subnets connected in this manner must have distinct, non\-overlapping subnet address blocks\&.) This is done by the default \fIupdown\fR script (see \fBipsec_pluto\fR(8))\&. .PP The implementation of this makes certain assumptions about firewall setup, and the availability of the \fILinux Advanced Routing\fR tools\&. In situations calling for more control, it may be preferable for the user to supply his own \fIupdown\fR script, which makes the appropriate adjustments for his system\&. .SS "CONN PARAMETERS: AUTOMATIC KEYING" .PP The following parameters are relevant to automatic keying via IKE\&. Unless otherwise noted, for a connection to work, in general it is necessary for the two ends to agree exactly on the values of these parameters\&. .PP \fBauto\fR .RS 4 what operation, if any, should be done automatically at IPsec startup; currently\-accepted values are \fBadd\fR (signifying an \fBipsec auto\fR \fB\-\-add\fR), \fBondemand\fR (signifying that plus an \fBipsec auto\fR \fB\-\-ondemand\fR), \fBstart\fR (signifying that plus an \fBipsec auto\fR \fB\-\-up\fR), and \fBignore\fR (also the default) (signifying no automatic startup operation)\&. See the \fBconfig setup\fR discussion below\&. Relevant only locally, other end need not agree on it (but in general, for an intended\-to\-be\-permanent connection, both ends should use \fBauto=start\fR to ensure that any reboot causes immediate renegotiation)\&. .sp The option \fBondemand\fR used to be called \fBroute\fR .RE .PP \fBauthby\fR .RS 4 how the two security gateways should authenticate each other; acceptable values are \fBrsasig\fR (the default) for RSA authentication with SHA\-1, \fBrsa\-sha2\fR for RSA\-PSS digital signatures based authentication with SHA2\-256, \fBrsa\-sha2_384\fR for RSA\-PSS digital signatures based authentication with SHA2\-384, \fBrsa\-sha2_512\fR for RSA\-PSS digital signatures based authentication with SHA2\-512, \fBsecret\fR for shared secrets (PSK) authentication, \fBsecret|rsasig\fR for either, \fBnever\fR if negotiation is never to be attempted or accepted (useful for shunt\-only conns), and \fBnull\fR for null\-authentication\&. .sp If asymmetric authentication is requested, IKEv2 must be enabled, and the options \fBleftauth=\fR and \fBrightauth=\fR should be used instead of authby\&. .sp Digital signatures are superior in every way to shared secrets\&. Especially IKEv1 in Aggressive Mode is vulnerable to offline dictionary attacks and is performed routinely by at least the NSA on monitored internet traffic globally\&. The never option is only used for connections that do not actually start an IKE negotiation, such as type=passthrough connections\&. The auth method null is used for "anonymous opportunistic IPsec" and should not be used for regular pre\-configured IPsec VPNs\&. .RE .PP \fBike\fR .RS 4 IKE encryption/authentication algorithm to be used for the connection (phase 1 aka ISAKMP SA)\&. The format is \fI"cipher\-hash;modpgroup, cipher\-hash;modpgroup, \&.\&.\&."\fR Any left out option will be filled in with all allowed default options\&. Multiple proposals are separated by a comma\&. If an \fBike=\fR line is specified, no other received proposals will be accepted\&. Formerly there was a distinction (by using a \fB"!"\fR symbol) between "strict mode" or not\&. That mode has been obsoleted\&. If an \fBike=\fR option is specified, the mode is always strict, meaning no other received proposals will be accepted\&. Some examples are \fBike=3des\-sha1,aes\-sha1\fR, \fBike=aes\fR, \fBike=aes_ctr\fR, \fBike=aes_gcm256\-sha2\fR, \fBike=aes128\-md5;modp2048\fR, \fBike=aes256\-sha2;dh19\fR, \fBike=aes128\-sha1;dh22\fR, \fBike=3des\-md5;modp1024,aes\-sha1;modp1536\fR\&. The options must be suitable as a value of \fBipsec_spi\fR(8)\*(Aqs \fB\-\-ike\fR option\&. The default IKE proposal depends on the version of libreswan used\&. It follow the recommendations of RFC4306, RFC7321 and as of this writing their successor draft documents RFC4306bis and RFC7321bis\&. For IKEv1, SHA1 and MODP1536 are still allowed per default for backwards compatibility, but 3DES and MODP1024 are not allowed per default\&. IKEv2\*(Aqs minimum is AES, MODP2048 and SHA2\&. The default key size is 256 bits\&. The default AES_GCM ICV is 16 bytes\&. .sp Note that AES\-GCM is an AEAD algorithm, meaning that it performs encryption+authentication in one step\&. This means that AES\-GCM must not specify an authentication algorithm\&. However, it does require a PRF function, so the second argument to an AEAD algorithm denotes the PRF\&. So ike=aes_gcm\-sha2 means propose AES_GCM with no authentication and using SHA2 as the prf\&. Note that for phase2alg, there is no prf, so AES\-GCM is specified for ESP as phase2alg=aes_gcm\-null\&. The AES\-GCM and AES\-CCM algorithms support 8,12 and 16 byte ICV\*(Aqs\&. These can be specified using a postfix, for example aes_gcm_a (for 8), aes_gcm_b (for 12) and aes_gcm_c (for 16)\&. The default (aes_gcm without postfix) refers to the 16 byte ICV version\&. It is strongly recommended to NOT use the 8 or 12 byte versions of GCM or CCM\&. .sp Weak algorithms are regularly removed from libreswan\&. Currently, 1DES and modp768 have been removed and modp1024 will be removed in the near future\&. Additionally, md5 and sha1 will be removed within the next few years\&. Null encryption is available, and should only be used for testing or benchmarking purposes\&. Please do not request for insecure algorithms to be re\-added to libreswan\&. .sp Diffie\-Hellman groups 19,20 and 21 from RFC\- 5903 and 22, 23 and 24 from RFC\-5114 are also supported\&. For all groups, the "dh" keyword can be used\&. For the MODP based groups, the modp= keyword can be used\&. for example \fIike=3des\-sha1;dh19\fR\&. The RFC\-5114 DH groups are extremely controversial and MUST NOT be used unless forced (administratively) by the other party\&. Support for these groups will most likely be removed in 2017, as it cannot be proven these DH groups do not have a cryptographic trapdoor embedded in them (a backdoor by the USG who provided these primes without revealing the seeds and generation process used)\&. Due the the weakness od DH22, support for this group is not compiled in by default and can be re\-enabled using USE_DH22=true\&. .sp The modp syntax will be removed in favour of the dh syntax in the future .RE .PP \fBphase2\fR .RS 4 Sets the type of SA that will be produced\&. Valid options are: \fBesp\fR for encryption (the default), \fBah\fR for authentication only\&. .sp The very first IPsec designs called for use of AH plus ESP to offer authentication, integrity and confidentiality\&. That dual protocol use was a significant burden, so ESP was extended to offer all three services, and AH remained as an auth/integ\&. The old mode of \fBah+esp\fR is no longer supported in compliance with RFC 8221 Section 4\&. Additionally, AH does not play well with NATs, so it is strongly recommended to use ESP with the null cipher if you require unencrypted authenticated transport\&. .RE .PP \fBphase2alg\fR .RS 4 Specifies the algorithms that will be offered/accepted for a phase2 negotiation\&. If not specified, a secure set of defaults will be used\&. Sets are separated using comma\*(Aqs\&. .sp The default values are the same as for ike= Note also that not all ciphers available to the kernel (eg through CryptoAPI) are necessarily supported here\&. .sp The format for ESP is ENC\-AUTH followed by one optional PFSgroup\&. For instance, "3des\-md5" or "aes256\-sha1;modp2048" or "aes\-sha1,aes\-md5"\&. When specifying multiple algorithms, specify the PFSgroup last, e\&.g\&. "3des\-md5,aes256\-sha1;modp2048"\&. .sp For RFC\-5114 DH groups, use the "dh" keyword, eg "aes256\-sha1;dh23"\&. These specific DH groups are extremely controversial and MUST NOT be used unless forced (administratively) by the other party\&. Support for these groups will most likely be removed in 2017, as it cannot be proven these DH groups do not have a cryptographic trapdoor embedded in them (a backdoor by the USG who gave us these primes without revealing the seeds and generation process) .sp The format for AH is AUTH followed by an optional PFSgroup\&. For instance, "md5" or "sha1;modp1536"\&. .sp AEAD algorithms such as AES\-GCM and AES\-CCM require null for the authentication algorithm, for example \fIphase2alg=aes_ccm\-null\fR or \fIphase2alg=aes_gcm\-null\fR\&. Note that the ike= syntax for aes_gcm does not specify a null authentication but specifies the prf instead\&. The supported key sizes are 128, 192 and 256, which are specified similarly to plain aes, i\&.e\&. \fIphase2alg=aes_gcm256\fR\&. A subscript of \fI_c\fR, \fI_b\fR or \fI_a\fR can be used to refer to the different ICV variants where a means 8 bytes, b means 12 bytes and c means 16 bytes\&. The default when not using a subscript is the 16 byte ICV, the recommended value by RFC\-4106\&. Therefor phase2alg=aes_gcm256\-null is equivalent to phase2alg=aes_gcm_c256\-null\&. It is recommended to migrate to the _c versions (without specifying _c), as support for smaller ICV\*(Aqs might be removed in the near future\&. .sp The supported algorithms depend on the libreswan version, OS and kernel stack used\&. Possible ciphers are aes, 3des, aes_ctr, aes_gcm, aes_ccm, camellia, serpent and twofish\&. .sp Note that openswan and versions of libreswan up to 3\&.6 require manually adding the salt size to the key size\&. Therefor, to configure an older version of openswan or libreswan, use: "phase2alg=aes_ccm_c\-280\-null" to interop with a new libreswan using "phase2alg=aes_ccm256"\&. For CCM, the \*(Aqkeysize\*(Aq needs to be increased by 24, resulted in valid keysizes of 152, 215 and 280\&. For GCM the \*(Aqkeysize\*(Aq needs to be increased by 32, resulting valid \*(Aqkeysizes\*(Aq of 160, 224 and 288\&. .RE .PP \fBsha2\-truncbug\fR .RS 4 The default ESP hash truncation for sha2_256 is 128 bits\&. Some IPsec implementations (Linux before 2\&.6\&.33, some Cisco (2811?) routers) implement the draft version which stated 96 bits\&. If a draft implementation communicates with an RFC implementation, both ends will reject encrypted packets from each other\&. .sp This option enables using the draft 96 bits version to interop with those implementations\&. Currently the accepted values are \fBno\fR, (the default) signifying default RFC truncation of 128 bits, or \fByes\fR, signifying the draft 96 bits truncation\&. .sp Another workaround is to switch from sha2_256 to sha2_128 or sha2_512\&. .RE .PP \fBmsdh\-downgrade\fR .RS 4 Whether to allow a downgrade of DiffieHellman group during rekey (using CREATE_CHILD_SA)\&. Microsoft Windows (at the time of writing, Feb 2018) defaults to using the very weak modp1024 (DH2)\&. This can be changed using a Windows registry setting to use modp2048 (DH14)\&. However, at rekey times, it will shamelessly use modp1024 again and the connection might fail\&. Setting this option to true (and adding modp1024 proposals to the ike line) this will allow this downgrade attack to happen\&. This should only be used to support Windows that feature this bug\&. Currently the accepted values are \fBno\fR, (the default) or \fByes\fR\&. .RE .PP \fBdns\-match\-id\fR .RS 4 Whether to perform an additional DNS lookup and confirm the remote ID payload with the DNS name in the reverse DNS PTR record\&. Accepted values are \fBno\fR (the default) or \fByes\fR\&. This check should be enabled when Opportunistic IPsec is enabled in a mode that is based on packet triggers (on\-demand) using IPSECKEY records in DNS\&. Since in that case the IKE daemon pluto does not know the remote ID, it only knows the remote IP address, this option forces it to confirm the peer\*(Aqs proposed ID (and thus its public/private key) with its actual IP address as listed in the DNS\&. This prevents attacks where mail\&.example\&.com\*(Aqs IP address is taken over by a neighbour machine with a valid web\&.example\&.com setup\&. This check is not needed for certificate based Opportunistic IPsec, as "mail\&.example\&.com"s certificate does not have an entry for "web\&.example\&.com"\&. It is also not needed for DNS server triggered Opportunistic IPsec, as in that case the IKE daemon pluto is informed of both the IP address, and the hostname/public key\&. .RE .PP \fBppk\fR .RS 4 EXPERIMENTAL: Post\-quantum preshared keys (PPKs) to be used\&. Currently the accepted values are \fBpropose\fR or \fByes\fR (the default), signifying we propose to use PPK for this connection; \fBinsist\fR, signifying we allow communication only if PPK is used for key derivation; \fBnever\fR or \fBno\fR, signifying that PPK should not be used for key derivation\&. PPKs can be used in connections that allow only IKEv2\&. In libreswan that would mean that ikev2 option must have value \fBinsist\fR\&. (currently based on draft\-fluhrer\-qr\-ikev2, not raft\-ietf\-ipsecme\-qr\-ikev2\-00) .RE .PP \fBnat\-ikev1\-method\fR .RS 4 NAT Traversal in IKEv1 is negotiated via Vendor ID options as specified in RFC 3947\&. However, many implementations only support the draft version of the RFC\&. Libreswan sends both the RFC and the most common draft versions (02, 02_n and 03) to maximize interoperability\&. Unfortunately, there are known broken implementations of RFC 3947, notably Cisco routers that have not been updated to the latest firmware\&. As the NAT\-T payload is sent in the very first packet of the initiator, there is no method to auto\-detect this problem and initiate a workaround\&. .sp This option allows fine tuning which of the NAT\-T payloads to consider for sending and processing\&. Currently the accepted values are \fBdrafts\fR, \fBrfc\fR, \fBboth\fR (the default) and \fBnone\fR\&. To interoperate with known broken devices, use nat\-ikev1\-method=drafts\&. To prevent the other end from triggering IKEv1 NAT\-T encapsulation, set this to none\&. This will omit the NAT\-T payloads used to determine NAT, forcing the other end not to use encapsulation\&. .RE .PP \fBesp\fR .RS 4 This option is alias to \fBphase2alg\fR instead\&. .RE .PP \fBah\fR .RS 4 AH authentication algorithm to be used for the connection, e\&.g here\&. \fBhmac\-md5\fR The options must be suitable as a value of \fBipsec_spi\fR(8)\*(Aqs \fB\-\-ah\fR option\&. The default is not to use AH\&. If for some (invalid) reason you still think you need AH, please use esp with the null encryption cipher instead\&. Note also that not all ciphers available to the kernel (eg through CryptoAPI) are necessarily supported here\&. .RE .PP \fBfragmentation\fR .RS 4 Whether or not to allow IKE fragmentation\&. Valid values are \fByes\fR, (the default), \fBno\fR or \fBforce\fR\&. .sp IKEv1 fragmentation capabilities are negotiated via a well\-known private \fIvendor id\fR\&. IKEv2 fragmentation support is implemented using RFC 7383\&. If pluto does not receive the fragmentation payload, no IKE fragments will be sent, regardless of the fragmentation= setting\&. When set to \fByes\fR, IKE fragmentation will be attempted on the first re\-transmit of an IKE packet of a size larger then 576 bytes for IPv4 and 1280 bytes for IPv6\&. If fragmentation is set to force, IKE fragmentation is used on initial transmits of such sized packets as well\&. When we have received IKE fragments for a connection, pluto behaves as if in force mode\&. .RE .PP \fBikepad\fR .RS 4 Whether or not to pad IKEv1 messages to a multiple of 4 bytes\&. Valid values are \fByes\fR, (the default) and \fBno\fR\&. .sp IKE padding is allowed in IKEv1 but has been known to cause interoperability issues\&. The ikepad= option can be used to disable IKEv1 padding\&. This used to be required for some devices (such as Checkpoint in Aggressive Mode) that reject padded IKEv1 packets\&. A bug was fixed in libreswan 3\&.25 that applied wrong IKE padding in XAUTH, so it is suspected that Checkpoint padding issue bas been resolved\&. And this option should not be needed by anyone\&. In IKEv2, no padding is allowed, and this option has no effect\&. If you find a device that seems to require IKE padding, please contact the libreswan developers\&. This option should almost never be enabled and might be removed in a future version\&. .RE .PP \fBikev2\fR .RS 4 IKEv2 (RFC 7296) settings to be used\&. Currently the accepted values are \fBpermit\fR(the default), signifying IKEv2 will be accepted if received, but IKEv1 will be used when initiating; \fBnever\fR or \fBno\fR signifying no IKEv2 negotiation should be transmitted or accepted; \fBpropose\fR or \fByes\fR signifying that we permit IKEv1 and IKEv2, and use IKEv2 as the default to initiate; and \fBinsist\fRsignifying we only accept and receive IKEv2 \- IKEv1 negotiations will be rejected\&. .sp If the ikev2= setting is set to \fBpermit\fR or \fBpropose\fR, Libreswan will try and detect a "bid down" attack from IKEv2 to IKEv1\&. Since there is no standard for transmitting the IKEv2 capability with IKEv1, Libreswan uses a special Vendor ID "CAN\-IKEv2"\&. If a fall back from IKEv2 to IKEv1 was detected, and the IKEv1 negotiation contains Vendor ID "CAN\-IKEv2", Libreswan will immediately attempt and IKEv2 rekey and refuse to use the IKEv1 connection\&. With an ikev2= setting of \fBinsist\fR, no IKEv1 negotiation is allowed, and no bid down attack is possible\&. .RE .PP \fBmobike\fR .RS 4 Whether to allow MOBIKE (RFC 4555) to enable a connection to migrate its endpoint without needing to restart the connection from scratch\&. This is used on mobile devices that switch between wired, wireless or mobile data connections\&. Current values are \fBno\fR (the default) or \fByes\fR, Only connection acting as modecfgclient will allow the initiator to migrate using mobike\&. Only connections acting as modecfgserver will allow clients to migrate\&. .sp VTI and MOBIKE might not work well when used together\&. .RE .PP \fBesn\fR .RS 4 Whether or not to enable Extended Sequence Number (ESN) for the IPsec SA\&. ESN is typically used for very high\-speed links (10Gbps or faster) where the standard 32 bit sequence number is exhausted too quickly, causing IPsec SA\*(Aqs rekeys to happen too often\&. Accepted values are \fBno\fR (the default), \fByes\fR and \fBeither\fR\&. If \fIeither\fR is specified as an initiator, the responder will make the choice\&. As a responder, if \fIeither\fR is received, \fIno\fR is picked\&. .RE .PP \fBdecap\-dscp\fR .RS 4 Enable decapsulating the Differentiated Services Code Point (DSCP, formerly known as Terms Of Service (TOS)) bits\&. If these bits are set on the inner (encrypted) IP packets, these bits are set on the decrypted IP packets\&. Acceptable values are \fBno\fR (the default) or \fByes\fR\&. Currently this feature is only implemented for the Linux XFRM/NETKEY stack\&. .RE .PP \fBnopmtudisc\fR .RS 4 Disable Path MTU discovery for the IPsec SA\&. Acceptable values are \fBno\fR (the default) or \fByes\fR\&. Currently this feature is only implemented for the Linux XFRM/NETKEY stack\&. .RE .PP \fBnarrowing\fR .RS 4 IKEv2 (RFC5996) Section 2\&.9 Traffic Selector narrowing options\&. Currently the accepted values are \fBno\fR, (the default) signifying no narrowing will be proposed or accepted, or \fByes\fR, signifying IKEv2 negotiation may allow establishing an IPsec connection with narrowed down traffic selectors\&. This option is ignored for IKEv1\&. .sp There are security implications in allowing narrowing down the proposal\&. For one, what should be done with packets that we hoped to tunnel, but cannot\&. Should these be dropped or send in the clear? Second, this could cause thousands of narrowed down Child SAs to be created if the conn has a broad policy (eg 0/0 to 0/0)\&. One possible good use case scenario is that a remote end (that you fully trust) allows you to define a 0/0 to them, while adjusting what traffic you route via them, and what traffic remains outside the tunnel\&. However, it is always preferred to setup the exact tunnel policy you want, as this will be much clearer to the user\&. .RE .PP \fBsareftrack\fR .RS 4 Set the method of tracking reply packets with SArefs when using an SAref compatible stack\&. Currently only the \fImast\fR stack supports this\&. Acceptable values are \fByes\fR (the default), \fBno\fR or \fBconntrack\fR\&. This option is ignored when SArefs are not supported\&. This option is passed as PLUTO_SAREF_TRACKING to the \fIupdown\fR script which makes the actual decisions whether to perform any iptables/ip_conntrack manipulation\&. A value of yes means that an IPSEC mangle table will be created\&. This table will be used to match reply packets\&. A value of conntrack means that additionally, subsequent packets using this connection will be marked as well, reducing the lookups needed to find the proper SAref by using the ip_conntrack state\&. A value of no means no IPSEC mangle table is created, and SAref tracking is left to a third\-party (kernel) module\&. In case of a third party module, the SArefs can be relayed using the \fIstatsbin=\fR notification helper\&. .RE .PP \fBnic\-offload\fR .RS 4 Set the method of Network Interface Controller (NIC) hardware offload for ESP/AH packet processing\&. Acceptable values are \fBauto\fR (the default), \fByes\fR or \fBno\fR\&. This option is separate from any CPU hardware offload available and is currently only available on Linux 4\&.13+ using the NETKEY/XFRM IPsec stack, when compiled with the options CONFIG_XFRM_OFFLOAD, CONFIG_INET_ESP_OFFLOAD and CONFIG_INET6_ESP_OFFLOAD\&. The auto option will attempt to auto\-detect the presence of kernel and hardware support, and then automatically mark the IPsec SA for hardware offloading\&. One vendor supporting this offload method is Mellanox\&. .RE .PP \fBleftid\fR .RS 4 how the left participant should be identified for authentication; defaults to \fBleft\fR\&. Can be an IP address or a fully\-qualified domain name which will be resolved\&. If preceded by \fB@\fR, the value is used as a literal string and will not be resolved\&. To support opaque identifiers (usually of type ID_KEY_ID, such as used by Cisco to specify Group Name, use square brackets, eg \fBrightid=@[GroupName]\fR\&. The magic value \fB%fromcert\fR causes the ID to be set to a DN taken from a certificate that is loaded\&. Prior to 2\&.5\&.16, this was the default if a certificate was specified\&. The magic value \fB%none\fR sets the ID to no ID\&. This is included for completeness, as the ID may have been set in the default conn, and one wishes for it to default instead of being explicitly set\&. The magic value \fB%myid\fR stands for the current setting of \fImyid\fR\&. This is set in \fBconfig setup\fR or by \fBipsec_whack\fR(8)), or, if not set, it is the IP address in \fB%defaultroute\fR (if that is supported by a TXT record in its reverse domain), or otherwise it is the system\*(Aqs hostname (if that is supported by a TXT record in its forward domain), or otherwise it is undefined\&. .sp When using certificate based ID\*(Aqs, one need to specify the full RDN, optionally using wildcard matching (eg CN=\*(Aq*\*(Aq)\&. If the RDN contains a comma, this can be masked using a comma (eg OU=\*(AqFoo,, Bar and associates\*(Aq) .RE .PP \fBleftrsasigkey\fR .RS 4 the left participant\*(Aqs public key for RSA signature authentication, in RFC 2537 format using \fBipsec_ttodata\fR(3) encoding\&. The magic value \fB%none\fR means the same as not specifying a value (useful to override a default)\&. The value \fB%dnsondemand\fR (the default) means the key is to be fetched from DNS at the time it is needed\&. The value \fB%dnsonload\fR means the key is to be fetched from DNS at the time the connection description is read from \fIipsec\&.conf\fR; currently this will be treated as \fB%none\fR if \fBright=%any\fR or \fBright=%opportunistic\fR\&. The value \fB%dns\fR is currently treated as \fB%dnsonload\fR but will change to \fB%dnsondemand\fR in the future\&. The identity used for the left participant must be a specific host, not \fB%any\fR or another magic value\&. The value \fB%cert\fR will load the information required from a certificate defined in \fB%leftcert\fR and automatically define leftid for you\&. \fBCaution:\fR if two connection descriptions specify different public keys for the same \fBleftid\fR, confusion and madness will ensue\&. .RE .PP \fBleftrsasigkey2\fR .RS 4 if present, a second public key\&. Either key can authenticate the signature, allowing for key rollover\&. .RE .PP \fBleftcert\fR .RS 4 If you are using \fBleftrsasigkey=%cert\fR this defines the certificate nickname of your certificate in the NSS database\&. This can be on software or hardware security device\&. .RE .PP \fBleftckaid\fR .RS 4 The hex CKAID of the X\&.509 certificate\&. Certificates are stored in the NSS database\&. .RE .PP \fBleftauth\fR .RS 4 How the security gateways will authenticate to the other side in the case of asymmetric authentication; acceptable values are \fBrsasig\fR for RSA Authentication with SHA\-1, \fBrsa\-sha2\fR for RSA\-PSS digital signatures based authentication with SHA2\-256, \fBrsa\-sha2_384\fR for RSA\-PSS digital signatures based authentication with SHA2\-384, \fBrsa\-sha2_512\fR for RSA\-PSS digital signatures based authentication with SHA2\-512, \fBsecret\fR for shared secrets (PSK) authentication and \fBnull\fR for null\-authentication\&. There is no default value \- if unset, the symmetrical \fBauthby=\fR keyword is used to determine the authentication policy of the connection\&. .sp If asymmetric authentication is requested, IKEv1 must be disabled\&. If symmetric authentication is required, use \fBauthby=\fR instead of leftauth/rightauth\&. If leftauth is set, rightauth must also be set and authby= must not be set\&. Asymmetric authentication cannot use secret (psk) on one side and null on the other side \- use psk on both ends instead\&. .sp Be aware that the symmetric keyword is \fBauthby=\fR but the asymmetric keyword is \fBleftauth\fR and \fBrightauth\fR (without the "by")\&. .RE .PP \fBleftca\fR .RS 4 specifies the authorized Certificate Authority (CA) that signed the certificate of the peer\&. If undefined, it defaults to the CA that signed the certificate specified in \fBleftcert\fR\&. The special \fBrightca=%same\fR is implied when not specifying a \fBrightca\fR and means that only peers with certificates signed by the same CA as the leftca will be allowed\&. This option is only useful in complex multi CA certificate situations\&. When using a single CA, it can be safely omitted for both left and right\&. .RE .PP \fBleftsendcert\fR .RS 4 This option configures when Libreswan will send X\&.509 certificates to the remote host\&. Acceptable values are \fByes|always\fR (signifying that we should always send a certificate), \fBsendifasked\fR (signifying that we should send a certificate if the remote end asks for it), and \fBno|never\fR (signifying that we will never send a X\&.509 certificate)\&. The default for this option is \fBsendifasked\fR which may break compatibility with other vendor\*(Aqs IPsec implementations, such as Cisco and SafeNet\&. If you find that you are getting errors about no ID/Key found, you likely need to set this to \fBalways\fR\&. This per\-conn option replaces the obsolete global \fBnocrsend\fR option\&. .RE .PP \fBleftxauthserver\fR .RS 4 Left is an XAUTH server\&. This can use PAM for authentication or md5 passwords in \fI/etc/ipsec\&.d/passwd\fR\&. These are additional credentials to verify the user identity, and should not be confused with the XAUTH \fBgroup secret\fR, which is just a regular PSK defined in \fIipsec\&.secrets\fR\&. The other side of the connection should be configured as \fBrightxauthclient\fR\&. XAUTH connections cannot rekey, so \fBrekey=no\fR should be specified in this conn\&. For further details on how to compile and use XAUTH, see README\&.XAUTH\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. .RE .PP \fBleftxauthclient\fR .RS 4 Left is an XAUTH client\&. The xauth connection will have to be started interactively and cannot be configured using \fBauto=start\fR\&. Instead, it has to be started from the commandline using \fIipsec auto \-\-up connname\fR\&. You will then be prompted for the username and password\&. To setup an XAUTH connection non\-interactively, which defeats the whole purpose of XAUTH, but is regularly requested by users, it is possible to use a whack command \- \fIipsec whack \-\-name baduser \-\-ipsecgroup\-xauth \-\-xauthname badusername \-\-xauthpass password \-\-initiate\fR The other side of the connection should be configured as \fBrightxauthserver\fR\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. .RE .PP \fBleftusername\fR .RS 4 The username associated with this connection\&. The username can be the IKEv2 XAUTH username, a GSSAPI username or IKEv2 CP username\&. For the XAUTH username, the XAUTH password can be configured in the \fIipsec\&.secrets\fR file\&. This option was previously called leftxauthusername\&. .RE .PP \fBleftmodecfgserver\fR .RS 4 Left is a Mode Config server\&. It can push network configuration to the client\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. .RE .PP \fBleftmodecfgclient\fR .RS 4 Left is a Mode Config client\&. It can receive network configuration from the server\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. .RE .PP \fBxauthby\fR .RS 4 When IKEv1 XAUTH support is available, set the method used by XAUTH to authenticate the user with IKEv1\&. The currently supported values are \fIfile\fR (the default), \fIpam\fR or \fIalwaysok\fR\&. The password file is located at \fI/etc/ipsec\&.d/passwd\fR, and follows a syntax similar to the Apache htpasswd file, except an additional connection name argument (and optional static IP address) are also present: .sp \ \&\ \&\ \&\ \&\ \& \fIusername:password:conname:ipaddress\fR .sp For supported password hashing methods, see \fBcrypt\fR(3)\&. If pluto is running in FIPS mode, some hash methods, such as MD5, might not be available\&. Threads are used to launch an xauth authentication helper for file as well as PAM methods\&. .sp The \fIalwaysok\fR should only be used if the XAUTH user authentication is not really used, but is required for interoperability, as it defeats the whole point of XAUTH which is to rely on a secret only known by a human\&. See also \fIpam\-authorize=yes\fR .RE .PP \fBxauthfail\fR .RS 4 When XAUTH support is available, set the failure method desired when authentication has failed\&. The currently supported values are \fIhard\fR (the default) and \fIsoft\fR\&. A soft failure means the IPsec SA is allowed to be established, as if authentication had passed successfully, but the XAUTH_FAILED environment variable will be set to 1 for the updown script, which can then be used to redirect the user into a walled garden, for example a payment portal\&. .RE .PP \fBpam\-authorize\fR .RS 4 IKEv1 supports PAM authorization via XAUTH using \fIxauthby=pam\fR\&. IKEv2 does not support receiveing a plaintext username and password\&. Libreswan does not yet support EAP authentication methods for IKE\&. The pam\-authorize=yes option performs an authorization call via PAM, but only includes the remote ID (not username or password)\&. This allows for backends to disallow an ID based on non\-password situations, such as "user disabled" or "user over quota"\&. See also \fIxauthby=pam\fR .RE .PP \fBmodecfgpull\fR .RS 4 Pull the Mode Config network information from the server\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. .RE .PP \fBmodecfgdns\fR, \fBmodecfgdomains\fR, \fBmodecfgbanner\fR .RS 4 When configured as IKEv1 ModeCFG or IKEv2 server, specifying any of these options will cause those options and values to be sent to the connecting client\&. Libreswan as a client will use these received options to either update /etc/resolv\&.conf or the running unbound DNS server\&. When the connection is brought down, the previous DNS resolving state is restored\&. .sp The modecfgdns option takes a comma or space separated list of IP addresses that can be used for DNS resolution\&. The modecfgdomains option takes a comma or space separated list of internal domain names that are reachable via the supplied modecfgdns DNS servers\&. .sp The IKEv1 split tunnel directive will be sent automatically if the xauth server side has configured a network other than 0\&.0\&.0\&.0/0\&. For IKEv2, this is automated via narrowing\&. .RE .PP \fBremote\-peer\-type\fR .RS 4 Set the remote peer type\&. This can enable additional processing during the IKE negotiation\&. Acceptable values are \fBcisco\fR or \fBietf\fR (the default)\&. When set to cisco, support for Cisco IPsec gateway redirection and Cisco obtained DNS and domainname are enabled\&. This includes automatically updating (and restoring) /etc/resolv\&.conf\&. These options require that XAUTH is also enabled on this connection\&. .RE .PP \fBnm\-configured\fR .RS 4 Mark this connection as controlled by Network Manager\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. Currently, setting this to yes will cause libreswan to skip reconfiguring resolv\&.conf when used with XAUTH and ModeConfig\&. .RE .PP \fBencapsulation\fR .RS 4 In some cases, for example when ESP packets are filtered or when a broken IPsec peer does not properly recognise NAT, it can be useful to force RFC\-3948 encapsulation\&. In other cases, where IKE is NAT\*(Aqed but ESP packets can or should flow without encapsulation, it can be useful to ignore the NAT\-Traversal auto\-detection\&. \fBencapsulation=yes\fR forces the NAT detection code to lie and tell the remote peer that RFC\-3948 encapsulation (ESP in port 4500 packets) is required\&. \fBencapsulation=no\fR ignores the NAT detection causing ESP packets to send send without encapsulation\&. The default value of \fBencapsulation=auto\fR follows the regular outcome of the NAT auto\-detection code performed in IKE\&. This option replaced the obsoleted forceencaps option\&. .RE .PP \fBnat\-keepalive\fR .RS 4 whether to send any NAT\-T keep\-alives\&. These one byte packets are send to prevent the NAT router from closing its port when there is not enough traffic on the IPsec connection\&. Acceptable values are: \fByes\fR (the default) and \fBno\fR\&. .RE .PP \fBinitial\-contact\fR .RS 4 whether to send an INITIAL_CONTACT payload to the peer we are initiating to, if we currently have no IPsec SAs up with that peer\&. Acceptable values are: \fBno\fR (the default) and \fByes\fR\&. It is recommended to leave this option unset, unless the remote peer requires it to allow reconnects\&. The only known peer at this time is Cisco, which will not allow a reconnect (despite authentication) to replace an existing IPsec SA unless it receives an INITIAL_CONTACT payload\&. Receiving this payload is ignored and the choice to replace or add an IPsec SA when libreswan is a responder is purely based on the \fBuniqueids\fR setting, which should be left enabled unless libreswan acts as an XAUTH server using PSK ("group secret")\&. This option can cause a few seconds of downtime on the IPsec tunnel between the time the remote clears the old IPsec SA in response to our INITIAL_CONTACT message, and the time we finish setting up the new IPsec SA\&. If there is an XAUTH step in between, and especially when XAUTH requires the use of some two\-factor token, this downtime could be even longer\&. .RE .PP \fBcisco\-unity\fR .RS 4 whether to send a CISCO_UNITY payload to the peer\&. Acceptable values are: \fBno\fR (the default) and \fByes\fR\&. It is recommended to leave this option unset, unless the remote peer (Cisco client or server) requires it\&. This option does not modify local behaviour\&. It can be needed to connect as a client to a Cisco server\&. It can also be needed to act as a server for a Cisco client, which otherwise might send back an error DEL_REASON_NON_UNITY_PEER\&. .RE .PP \fBfake\-strongswan\fR .RS 4 whether to send a STRONGSWAN Vendor ID payload to the peer\&. Acceptable values are: \fBno\fR (the default) and \fByes\fR\&. Strongswan rejects certain proposals with private use numbers such as esp=twofish or esp=serpent unless it receives a strongswan vendorid by the peer\&. This option sends such an (unversioned) vendor id\&. .RE .PP \fBsend\-vendorid\fR .RS 4 whether to send our Vendor ID during IKE\&. Acceptable values are: \fBno\fR (the default) and \fByes\fR\&. The vendor id sent can be configured using the "config setup" option \fBmyvendorid=\fR\&. It defaults to OE\-Libreswan\-VERSION\&. .sp Vendor ID\*(Aqs can be useful in tracking interoperability problems\&. However, specific vendor identification and software versions can be useful to an attacker when there are known vulnerabilities to a specific vendor/version\&. .sp The prefix OE stands for "Opportunistic Encryption"\&. This prefix was historically used by The FreeS/WAN Project and The Openswan Project (openswan up to version 2\&.6\&.38) and in one Xeleranized openswan versions (2\&.6\&.39)\&. Further Xeleranized openswan\*(Aqs use the prefix OSW\&. .RE .PP \fBoverlapip\fR .RS 4 a boolean (yes/no) that determines, when *subnet=vhost: is used, if the virtual IP claimed by this states created from this connection can with states created from other connections\&. .sp Note that connection instances created by the Opportunistic Encryption or PKIX (x\&.509) instantiation system are distinct internally\&. They will inherit this policy bit\&. .sp The default is no\&. .sp This feature is only available with kernel drivers that support SAs to overlapping conns\&. At present only the (klips) mast protocol stack supports this feature\&. .RE .PP \fBreqid\fR .RS 4 a unique identifier used to match IPsec SAs using iptables with NETKEY/XFRM\&. This identifier is normally automatically allocated in groups of 4\&. It is exported to the _updown script as REQID\&. On Linux, reqids are supported with IP Connection Tracking and NAT (iptables)\&. Automatically generated values use the range 16380 and higher\&. Manually specified reqid values therefor must be between 1 and 16379\&. .sp Automatically generated reqids use a range of 0\-3 (eg 16380\-16383 for the first reqid)\&. These are used depending on the exact policy (AH, AH+ESP, IPCOMP, etc)\&. .sp WARNING: Manually assigned reqids are all identical\&. Instantiations of connections (those using %any wildcards) will all use the same reqid\&. If you use manual assigning you should make sure your connections only match single road warrior only or you break multiple road warriors behind same NAT router because this feature requires unique reqids to work\&. .sp For KLIPS, when using the MAST variant, a different mechanism called SAref is in use\&. See overlapip and sareftrack\&. .RE .PP \fBdpddelay\fR .RS 4 Set the delay (in time units, defaults to seconds) between Dead Peer Detection (IKEv1 RFC 3706) or IKEv2 Liveness keepalives that are sent for this connection (default 0 seconds)\&. Set to enable checking\&. If dpddelay is set, dpdtimeout also needs to be set\&. .RE .PP \fBdpdtimeout\fR .RS 4 Set the length of time (in time units, defaults to seconds) that we will idle without hearing back from our peer\&. After this period has elapsed with no response and no traffic, we will declare the peer dead, and remove the SA (default 0 seconds)\&. Set value bigger than dpddelay to enable\&. If dpdtimeout is set, dpddelay also needs to be set\&. .RE .PP \fBdpdaction\fR .RS 4 When a DPD enabled peer is declared dead, what action should be taken\&. \fBhold\fR (default) means the eroute will be put into %hold status, while \fBclear\fR means the eroute and SA with both be cleared\&. \fBrestart\fR means that \fIALL\fR SAs to the dead peer will renegotiated\&. .sp \fIdpdaction=clear\fR is really only useful on the server of a Road Warrior config\&. .sp The value \fBrestart_by_peer\fR has been obsoleted and its functionality moved into the regular restart action\&. .RE .PP \fBpfs\fR .RS 4 whether Perfect Forward Secrecy of keys is desired on the connection\*(Aqs keying channel (with PFS, penetration of the key\-exchange protocol does not compromise keys negotiated earlier); Acceptable values are \fByes\fR (the default) and \fBno\fR\&. .RE .PP \fBpfsgroup\fR .RS 4 This option is obsoleted, please use phase2alg if you need the PFS to be different from phase1 (the default) using: phase2alg=aes128\-md5;modp1024 .RE .PP \fBaggressive\fR .RS 4 Use IKEv1 Aggressive Mode instead of IKEv1 Main Mode\&. This option has no effect when IKEv2 is used\&. Acceptable values are \fBno\fR (the default) or \fByes\fR\&. When this option is enabled, IKEv1 Main Mode will no longer be allowed for this connection\&. The old name of this option was \fBaggrmode\fR\&. .sp Aggressive Mode is less secure, and more vulnerable to Denial Of Service attacks\&. It is also vulnerable to brute force attacks with software such as \fBikecrack\fR\&. It should not be used, and it should especially not be used with XAUTH and group secrets (PSK)\&. If the remote system administrator insists on staying irresponsible, enable this option\&. .sp Aggressive Mode is further limited to only proposals with one DH group as there is no room to negotiate the DH group\&. Therefor it is mandatory for Aggressive Mode connections that both \fBike=\fR and \fBphase2alg=\fR options are specified with only one fully specified proposal using one DH group\&. .sp The KE payload is created in the first exchange packet when using aggressive mode\&. The KE payload depends on the DH group used\&. This is why there cannot be multiple DH groups in IKEv1 aggressive mode\&. In IKEv2, which uses a similar method to IKEv1 Aggressive Mode, there is an INVALID_KE response payload that can inform the initiator of the responder\*(Aqs desired DH group and so an IKEv2 connection can actually recover from picking the wrong DH group by restarting its negotiation\&. .RE .PP \fBsalifetime\fR .RS 4 how long a particular instance of a connection (a set of encryption/authentication keys for user packets) should last, from successful negotiation to expiry; acceptable values are an integer optionally followed by \fBs\fR (a time in seconds) or a decimal number followed by \fBm\fR, \fBh\fR, or \fBd\fR (a time in minutes, hours, or days respectively) (default \fB8h\fR, maximum \fB24h\fR)\&. Normally, the connection is renegotiated (via the keying channel) before it expires\&. The two ends need not exactly agree on \fBsalifetime\fR, although if they do not, there will be some clutter of superseded connections on the end which thinks the lifetime is longer\&. .sp The keywords "keylife" and "lifetime" are obsoleted aliases for "salifetime\&." Change your configs to use "salifetime" instead\&. .RE .PP \fBreplay\-window\fR .RS 4 The size of the IPsec SA replay window protection\&. The default is kernel stack specific, but usually 32\&. Linux NETKEY/XFRM allows at least up to 2048\&. A value of of 0 disables replay protection\&. Disabling of replay protection is sometimes used on a pair of IPsec servers in a High Availability setup, or on servers with very unpredictable latency, such as mobile networks, which can cause an excessive amount of out of order packets\&. Sequence errors can be seen in /proc/net/xfrm_stat\&. Note that technically, at least the Linux kernel can install IPsec SA\*(Aqs with an IPsec SA Sequence Number, but this is currently not supported by libreswan\&. .RE .PP \fBrekey\fR .RS 4 whether a connection should be renegotiated when it is about to expire; acceptable values are \fByes\fR (the default) and \fBno\fR\&. The two ends need not agree, but while a value of \fBno\fR prevents Pluto from requesting renegotiation, it does not prevent responding to renegotiation requested from the other end, so \fBno\fR will be largely ineffective unless both ends agree on it\&. .RE .PP \fBrekeymargin\fR .RS 4 how long before connection expiry or keying\-channel expiry should attempts to negotiate a replacement begin; acceptable values as for \fBsalifetime\fR (default \fB9m\fR)\&. Relevant only locally, other end need not agree on it\&. .RE .PP \fBrekeyfuzz\fR .RS 4 maximum percentage by which \fBrekeymargin\fR should be randomly increased to randomize rekeying intervals (important for hosts with many connections); acceptable values are an integer, which may exceed 100, followed by a `%\*(Aq (default set by \fBipsec_pluto\fR(8), currently \fB100%\fR)\&. The value of \fBrekeymargin\fR, after this random increase, must not exceed \fBsalifetime\fR\&. The value \fB0%\fR will suppress time randomization\&. Relevant only locally, other end need not agree on it\&. .RE .PP \fBkeyingtries\fR .RS 4 how many attempts (a whole number or \fB%forever\fR) should be made to negotiate a connection, or a replacement for one, before giving up (default \fB%forever\fR)\&. The value \fB%forever\fR means \(lqnever give up\(rq (obsolete: this can be written 0)\&. Relevant only locally, other end need not agree on it\&. .RE .PP \fBikelifetime\fR .RS 4 how long the keying channel of a connection (buzzphrase: \(lqISAKMP SA\(rq) should last before being renegotiated; acceptable values as for \fBsalifetime\fR (default set by \fBipsec_pluto\fR(8), currently \fB1h\fR, maximum \fB24h\fR)\&. The two\-ends\-disagree case is similar to that of \fBsalifetime\fR\&. .RE .PP \fBretransmit\-timeout\fR .RS 4 how long a single packet, including retransmits of that packet, may take before the IKE attempt is aborted\&. If rekeying is enabled, a new IKE attempt is started\&. The default set by \fBipsec_pluto\fR(8), currently is \fB60s\fR\&. See also: \fIretransmit\-interval\fR, \fIrekey\fR and \fIkeyingtries\fR\&. .RE .PP \fBretransmit\-interval\fR .RS 4 the initial interval time period, specified in msecs, that pluto waits before retransmitting an IKE packet\&. This interval is doubled for each attempt (exponential back\-off)\&. The default set by \fBipsec_pluto\fR(8), currently is \fB500\fR\&. See also: \fIretransmit\-timeout\fR, \fIrekey\fR and \fIkeyingtries\fR\&. .RE .PP \fBcompress\fR .RS 4 whether IPComp compression of content is proposed on the connection (link\-level compression does not work on encrypted data, so to be effective, compression must be done \fIbefore\fR encryption); acceptable values are \fByes\fR and \fBno\fR (the default)\&. .sp As of libreswan 3\&.1, both ends \fBmust\fR agree\&. In previous versions of libreswan, openswan and freeswan, compression was always accepted even if not configured\&. In light of the BEAST attacks on TLS, using compression and encryptions has come under more scrutiny, and it was decided that it should be possible for the local policy of an endpoint to disallow compression\&. A value of \fByes\fR causes pluto to propose compression and reject proposals without it\&. A value of \fBno\fR prevents pluto from proposing compression; a proposal to compress will be \fBrejected\fR\&. .RE .PP \fBmetric\fR .RS 4 Set the metric for the routes to the ipsecX or mastX interface\&. This makes it possible to do host failover from another interface to ipsec using route management\&. This value is passed to the _updown scripts as PLUTO_METRIC\&. This option is only available with KLIPS or MAST on Linux\&. Acceptable values are positive numbers, with the default being \fB1\fR\&. .RE .PP \fBmtu\fR .RS 4 Set the MTU for the route(s) to the remote endpoint and/or subnets\&. This is sometimes required when the overhead of the IPsec encapsulation would cause the packet the become too big for a router on the path\&. Since IPsec cannot trust any unauthenticated ICMP messages, PATH MTU discovery does not work\&. This can also be needed when using "6to4" IPV6 deployments, which adds another header on the packet size\&. Acceptable values are positive numbers\&. There is no default\&. .RE .PP \fBtfc\fR .RS 4 Enable Traffic Flow Confidentiality ("TFC") (RFC\-4303) for outgoing ESP packets in Tunnel Mode\&. When enabled, ESP packets are padded to the specified size (up to the PMTU size) to prevent leaking information based on ESP packet size\&. This option is ignored for AH and for ESP in Transport Mode as those always leak traffic characteristics and applying TFC will not do anything\&. Acceptable values are positive numbers\&. The value 0 means TFC padding is not performed\&. Currently this feature is only implemented for the Linux XFRM/NETKEY stack\&. In IKEv2, when the notify payload ESP_TFC_PADDING_NOT_SUPPORTED is received, TFC padding is disabled\&. The default is not to do any TFC padding, but this might change in the near future\&. .RE .PP \fBsend\-no\-esp\-tfc\fR .RS 4 Whether or not to tell the remote peer that we do not support Traffic Flow Confidentiality ("TFC") (RFC\-4303)\&. Possible values are \fBno\fR (the default) which allows the peer to use TFC or \fByes\fR which prevents to peer from using TFC\&. This does not affect whether this endpoint uses TFC, which only depends on the local \fBtfc\fR setting\&. This option is only valid for IKEv2\&. .RE .PP \fBnflog\fR .RS 4 If set, the NFLOG group number to log \fBthis connection\*(Aqs\fR pre\-crypt and post\-decrypt traffic to\&. The default value of \fB0\fR means no logging at all\&. This option is only available on linux kernel 2\&.6\&.14 and later\&. It allows common network utilities such as tcpdump, wireshark and dumpcap, to use nflog:XXX pseudo interfaces where XXX is the nflog group number\&. During the updown phase of a connection, iptables will be used to add and remove the source/destination pair to the nflog group specified\&. The rules are setup with the nflog\-prefix matching the connection name\&. See also the global \fBnflog\-all\fR option\&. .RE .PP \fBmark\fR .RS 4 If set, the MARK to set for the IPsec SA of this connection\&. The format of a CONNMARK is \fBmark/mask\fR\&. If the mask is left out, a default mask of 0xffffffff is used\&. A mark value of \-1 means to assign a new global unique mark number for each instance of the connection\&. Global marks start at 1001\&. This option is only available on linux NETKEY/XFRM kernels\&. It can be used with iptables to create custom iptables rules using CONNMARK\&. It can also be used with Virtual Tunnel Interfaces ("VTI") to direct marked traffic to specific vtiXX devices\&. .RE .PP \fBmark\-in\fR .RS 4 The same as \fBmark\fR, but mark\-in only applies to the inbound half of the IPsec SA\&. It overrides any mark= setting\&. .RE .PP \fBmark\-out\fR .RS 4 The same as \fBmark\fR, but mark\-out only applies to the outbound half of the IPsec SA\&. It overrides any mark= setting\&. .RE .PP \fBvti\-interface\fR .RS 4 This option is used to create "Routing based VPNs" (as opposed to "Policy based VPNs")\&. It will create a new interface that can be used to route traffic in for encryption/decryption\&. The Virtual Tunnel Interface ("VTI") interface name is used to for all IPsec SA\*(Aqs created by this connection\&. This requires that the connection also enables either the \fBmark=\fR or \fBmark\-in= / mark\-out\-\fR option(s)\&. All traffic marked with the proper MARKs will be automatically encrypted if there is an IPsec SA policy covering the source/destination traffic\&. Tools such as tcpdump and iptables can be used on all cleartext pre\-encrypt and post\-decrypt traffic on the device\&. See the libreswan wiki for example configurations that use VTI\&. .sp VTI interfaces are currently only supported on Linux with XFRM/NETKEY\&. The _updown script handles certain Linux specific interfaces settings required for proper functioning (disable_policy, rp_filter, forwarding, etc)\&. Interface names are limited to 16 characters and may not allow all characters to be used\&. If marking and \fIvti\-routing=yes\fR is used, no manual iptables should be required\&. However, administrators can use the iptables mangle table to mark traffic manually if desired\&. .RE .PP \fBvti\-routing\fR .RS 4 Whether or not to add network rules or routes for IPsec SA\*(Aqs to the respective VTI devices\&. Valid values are \fByes\fR (the default) or \fBno\fR\&. When using "routing based VPNs" with a subnets policy of 0\&.0\&.0\&.0/0, this setting needs to set to \fIno\fR to prevent imploding the tunnel, and the administrator is expected to manually add ip rules and ip routes to configure what traffic must be encrypted\&. When set to \fIyes\fR, the _updown script will automatically route the leftsubnet/rightsubnet traffic into the VTI device specified with \fIvti\-interface\fR .RE .PP \fBvti\-shared\fR .RS 4 Whether or not the VTI device is shared amongst connections\&. Valid values are \fBno\fR (the default) or \fByes\fR\&. When set to no, the VTI device is automatically deleted if the connection is a single non\-instantiated connection\&. If a connection instantiates (eg right=%any) then this option has no effect, as the VTI device is not removed as it is shared with multiple roadwarriors\&. .RE .PP \fBpriority\fR .RS 4 The priority in the kernel SPD/SAD database, when matching up packets\&. Each kernel (NETKEY, KLIPS, OSX, etc) has its own mechanism for setting the priority\&. Setting this option to non\-zero passes the priority to the kernel stack unmodified\&. The maximum value depends on the stack\&. It is recommended not to exceed 65536 .sp KLIPS and NETKEY use a priority system based on "most specific match first"\&. It uses an internal algorithm to calculate these based on network prefix length, protocol and port selectors\&. A lower value means a higher priority\&. .sp Typical values are about the 2000 range\&. These can be seen on the NETKEY stack using \fBip xfrm policy\fR when the connection is up\&. For "anonymous IPsec" or Opportunistic Encryption based connections, a much lower priority (65535) is used to ensure administrator configured IPsec always takes precedence over opportunistic IPsec\&. .RE .PP \fBsendca\fR .RS 4 How much of our available X\&.509 trust chain to send with the End certificate, excluding any root CA\*(Aqs\&. Specifying \fBissuer\fR sends just the issuing intermediate CA, while \fB all\fR will send the entire chain of intermediate CA\*(Aqs\&.\fBnone\fR (the default) will not send any CA certs\&. .RE .PP \fBdisablearrivalcheck\fR .RS 4 whether KLIPS\*(Aqs normal tunnel\-exit check (that a packet emerging from a tunnel has plausible addresses in its header) should be disabled; acceptable values are \fByes\fR and \fBno\fR (the default)\&. Tunnel\-exit checks improve security and do not break any normal configuration\&. Relevant only locally, other end need not agree on it\&. .RE .PP \fBlabeled\-ipsec\fR .RS 4 Whether labeled IPsec should be enabled or not; acceptable values are \fBno\fR (the default) and \fByes\fR\&. See also policy\-label= and secctx\-attr\-type= .RE .PP \fBpolicy\-label\fR .RS 4 The string representation of an access control security label that is interpreted by the LSM (e\&.g\&. SELinux) for use with Labeled IPsec\&. See also labeled\-ipsec= and secctx\-attr\-type=\&. For example, \fIpolicy\-label=system_u:object_r:ipsec_spd_t:s0\-s15:c0\&.c1023\fR .RE .PP \fBfailureshunt\fR .RS 4 what to do with packets when negotiation fails\&. The default is \fBnone\fR: no shunt; \fBpassthrough\fR, \fBdrop\fR, and \fBreject\fR have the obvious meanings\&. .RE .PP \fBnegotiationshunt\fR .RS 4 What to do with packets during the IKE negotiation\&. Valid options are \fBhold\fR (the default) or \fBpassthrough\fR\&. This should almost always be left to the default hold value to avoid cleartext packet leaking\&. The only reason to set this to passthrough is if plaintext service availability is more important than service security or privacy, a scenario that also implies failureshunt=passthrough and most likely authby=%null using Opportunistic Encryption\&. .RE .SH "CONFIG SECTIONS" .PP At present, the only \fBconfig\fR section known to the IPsec software is the one named \fBsetup\fR, which contains information used when the software is being started (see \fBipsec_setup\fR(8))\&. Here\*(Aqs an example: .sp .if n \{\ .RS 4 .\} .nf \fB config setup interfaces="ipsec0=eth1 ipsec1=ppp0" klipsdebug=none plutodebug=control protostack=auto \fR .fi .if n \{\ .RE .\} .PP Parameters are optional unless marked \(lq(required)\(rq\&. .PP The currently\-accepted \fIparameter\fR names in a \fBconfig setup\fR section are: .PP \fBprotostack\fR .RS 4 decide which protocol stack is going to be used\&. Valid values are "klips", "netkey" (the default) and "mast"\&. The "mast" stack is a variation for the KLIPS stack\&. The value "auto" has been obsoleted\&. .RE .PP \fBinterfaces\fR .RS 4 virtual and physical interfaces for IPsec to use: a single \fIvirtual\fR\fB=\fR\fIphysical\fR pair, a (quoted!) list of pairs separated by white space, or \fB%none\fR\&. One of the pairs may be written as \fB%defaultroute\fR, which means: find the interface \fId\fR that the default route points to, and then act as if the value was ``\fBipsec0=\fR\fId\fR\*(Aq\*(Aq\&. \fB%defaultroute\fR is the default; \fB%none\fR must be used to denote no interfaces, or when using the NETKEY stack\&. If \fB%defaultroute\fR is used (implicitly or explicitly) information about the default route and its interface is noted for use by \fBipsec_auto\fR(8)\&.) .RE .PP \fBlisten\fR .RS 4 IP address to listen on (default depends on \fBinterfaces=\fR setting)\&. Currently only accepts one IP address\&. .RE .PP \fBike\-socket\-bufsize\fR .RS 4 Set the IKE socket buffer size\&. Default size is determined by the OS (as of writing, this seems to be set to 212992\&. On Linux this is visible via /proc/sys/net/core/rmem_default and /proc/sys/net/core/wmem_default\&. On Linux, this option uses SO_RCVBUFFORCE and SO_SNDBUFFORCE so that it can override rmem_max/wmem_max values of the OS\&. This requires CAP_NET_ADMIN (which is also required for other tasks)\&. This option can also be toggled on a running system using \fIipsec whack \-\-ike\-socket\-bufsize bufsize\fR\&. .RE .PP \fBike\-socket\-errqueue\fR .RS 4 Whether to enable or disable receiving socket errors via IP_RECVERR\&. The default is enabled\&. This will cause the socket to receive, process and log socket errors, such as ICMP unreachable messages or Connection Refused messages\&. Disabling this only makes sense on very busy servers, and even then it might not make much of a difference\&. This option can also be toggled on a running system using \fIipsec whack \-\-ike\-socket\-errqueue\-toggle\fR\&. .RE .PP \fBikeport\fR .RS 4 The IKE port to listen on\&. The default value is \fB500\fR\&. As IKE is an internet standard, changing this means pluto will no longer be able to interop with other devices, unless they have also been explicitly configured to use a non\-standard IKE port\&. There might also be other subtle assumptions within the kernel that port 500 is used\&. Changing this port is strongly discouraged, and should probably only be done for testing or when required to circumvent VPN blocking technologies as employed by certain commercial companies and national governments\&. See also \fBnat\-ikeport\fR\&. .RE .PP \fBnflog\-all\fR .RS 4 If set, the NFLOG group number to log \fBall\fR pre\-crypt and post\-decrypt traffic to\&. The default value of \fB0\fR means no logging at all\&. This option is only available on linux kernel 2\&.6\&.14 and later\&. It allows common network utilities such as tcpdump, wireshark and dumpcap, to use nflog:XXX pseudo interfaces where XXX is the nflog group number\&. During startup and shutdown of the IPsec service, iptables commands will be used to add or remove the global NFLOG table rules\&. The rules are setup with the nflog\-prefix \fIall\-ipsec\fR\&. See also the per\-connection \fBnflog\fR option\&. .RE .PP \fBnat_traversal\fR .RS 4 OBSOLETE\&. Support for NAT Traversal is always enabled\&. .RE .PP \fBdisable_port_floating\fR .RS 4 OBSOLETE .RE .PP \fBforce_keepalive\fR .RS 4 This option has been obsoleted since libreswan version 3\&.2\&. See the \fInat\-keepalive\fR option\&. .RE .PP \fBnat\-ikeport\fR .RS 4 The IKE NAT Traversal floating port (see RFC\-3947) to listen on\&. The default value is \fB4500\fR\&. As IKE/NATT is an internet standard, changing this means pluto will no longer be able to interoperate with other devices, unless they have also been explicitly configured to use a non\-standard IKE/NATT port\&. There might also be other subtle assumptions within the kernel that port 4500 is used\&. Changing this port is strongly discouraged, and should probably only be done for testing or when required to circumvent VPN blocking technologies as employed by certain commercial companies and national governments\&. See also \fBikeport\fR\&. .RE .PP \fBkeep\-alive\fR .RS 4 The delay (in seconds) for NAT\-T keep\-alive packets, if these are enabled using \fBnat\-keepalive\fR This parameter may eventually become per\-connection\&. .RE .PP \fBvirtual\-private\fR .RS 4 contains the networks that are allowed as subnet= for the remote clients when using the \fBvhost:\fR or \fBvnet:\fR keywords in the \fBsubnet=\fR parameters\&. In other words, the address ranges that may live behind a NAT router through which a client connects\&. This value is usually set to all the RFC\-1918 address space, excluding the space used in the local subnet behind the NAT (An IP address cannot live at two places at once)\&. IPv4 address ranges are denoted as \fI%v4:a\&.b\&.c\&.d/mm\fR and IPv6 is denoted as \fI%v6:aaaa::bbbb:cccc:dddd:eeee/mm\fR\&. One can exclude subnets by using the \fB!\fR\&. For example, if the VPN server is giving access to 192\&.168\&.1\&.0/24, this option should be set to: \fIvirtual\-private=%v4:10\&.0\&.0\&.0/8,%v4:192\&.168\&.0\&.0/16,%v4:172\&.16\&.0\&.0/12,%v4:!192\&.168\&.1\&.0/24\fR\&. This parameter is only needed on the server side and not on the client side that resides behind the NAT router, as the client will just use its IP address for the inner IP setting\&. This parameter may eventually become per\-connection\&. See also \fBleftsubnet=\fR .sp Note: It seems that T\-Mobile in the US and Rogers/Fido in Canada have started using 25\&.0\&.0\&.0/8 as their pre\-NAT range\&. This range technically belongs to the Defence Interoperable Network Services Authority (DINSA), an agency of the Ministry of Defence of the United Kingdom\&. The network range seems to not have been announced for decades, which is probably why these organisations "borrowed" this range\&. To support roadwarriors on these 3G networks, you might have to add it to the virtual\-private= line\&. .RE .PP \fBmyvendorid\fR .RS 4 The string to use as our vendor id (VID) when send\-vendorid=yes\&. The default is OE\-Libreswan\-VERSION\&. .RE .PP \fBoe\fR .RS 4 This option is ignored for now\&. It used to determine if Opportunistic Encryption will be enabled\&. Opportunistic Encryption is the term to describe using IPsec tunnels without prearrangement\&. It uses IPSECKEY or TXT records to announce public RSA keys for certain IP\*(Aqs or identities\&. However, this feature is going to be moved outside of the pluto IKE daemon into a separate process, more closely tied with a local DNS(SEC) server\&. The default value used to be \fBno\fR, so this should not affect anyone\&. Contact the developers if you are interested in working on the re\-implementation of OE\&. .RE .PP \fBnhelpers\fR .RS 4 how many \fIpluto helpers\fR are started to help with cryptographic operations\&. Pluto will start \fI(n\-1)\fR of them, where \fIn\fR is the number of CPU\*(Aqs you have (including hypherthreaded CPU\*(Aqs)\&. A value of 0 forces pluto to do all operations in the main process\&. A value of \-1 tells pluto to perform the above calculation\&. Any other value forces the number to that amount\&. .RE .PP \fBseedbits\fR .RS 4 Pluto uses the NSS crypto library as its random source\&. Some government Three Letter Agencies require that pluto reads additional bits from /dev/random and feed these into the NSS RNG before drawing random from the NSS library, despite the NSS library itself already seeding its internal state\&. This process can block pluto for an extended time during startup, depending on the entropy of the system\&. Therefor, the default is to not perform this redundant seeding\&. If specifying a value, it is recommended to specify at least 460 bits (for FIPS) or 440 bits (for BSI)\&. .RE .PP \fBsecctx\-attr\-type\fR .RS 4 The value for the IPsec SA security context attribute identifier that is used for Labeled IPsec\&. Defaults to the private use IANA value 32001 from the IPsec SA attributes registry\&. Old openswan versions might still be using the (stolen) value 10, which has since been assigned by IANA for something else\&. Other values are not recommended unless IANA assigns an actual value for this\&. See also labeled\-ipsec= and policy\-label= .RE .PP \fBplutofork\fR .RS 4 This option has been obsoleted\&. The pluto daemon always forks unless it is started with the \-\-nofork option\&. .RE .PP \fBcrlcheckinterval\fR .RS 4 interval expressed in second units, for example crlcheckinterval=8h for 8 hours, after which pluto will fetch new Certificate Revocation List (CRL) from crl distribution points\&. List of used CRL distribution points are collected from CA certificates and end certificates\&. Loaded X\&.509 CRL\*(Aqs are verified to be valid and updates are imported to NSS database\&. If set to \fB0\fR, which is also the default value if this option is not specified, CRL updating is disabled\&. .RE .PP \fBcrl\-strict\fR .RS 4 if not set, pluto is tolerant about missing or expired X\&.509 Certificate Revocation Lists (CRL\*(Aqs), and will allow peer certificates as long as they do not appear on an expired CRL\&. When this option is enabled, all connections with an expired or missing CRL will be denied\&. Active connections will be terminated at rekey time\&. This setup is more secure, but vulnerable to downtime if the CRL expires\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. This option used to be called strictcrlpolicy\&. .RE .PP \fBcurl\-iface\fR .RS 4 The name of the interface that is used for CURL lookups\&. This is needed on rare situations where the interface needs to be forced to be different from the default interface used based on the routing table\&. .RE .PP \fBcurl\-timeout\fR .RS 4 The timeout for the curl library calls used to fetch CRL and OCSP requests\&. The default is 5s\&. .RE .PP \fBocsp\-enable\fR .RS 4 Whether to perform Online Certificate Store Protocol ("OCSP") checks on those certificates that have an OCSP URI defined\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. .RE .PP \fBocsp\-strict\fR .RS 4 if set to no, pluto is tolerant about failing to obtain an OCSP responses and a certificate is not rejected when the OCSP request fails, only when the OCSP request succeeds and lists the certificate as revoked\&. If set to yes, any failure on obtaining an OCSP status for a certificate will be fatal and the certificate will be rejected\&. Acceptable values are \fByes\fR or \fBno\fR (the default)\&. .sp The strict mode refers to the NSS ocspMode_FailureIsVerificationFailure mode, while non\-strict mode refers to the NSS ocspMode_FailureIsNotAVerificationFailure mode\&. .RE .PP \fBocsp\-method\fR .RS 4 The HTTP methods used for fetching OCSP data\&. Valid options are \fBget\fR (the default) and \fBpost\fR\&. Note that this behaviour depends on the NSS crypto library that is actually performing the fetching\&. When set to the get method, post is attempted only as fallback in case of failure\&. When set to post, only the post method is ever used\&. .RE .PP \fBocsp\-timeout\fR .RS 4 The time until an OCSP request is aborted and considered failed\&. The default value is 2 seconds\&. .RE .PP \fBocsp\-uri\fR .RS 4 The URI to use for OCSP requests instead of the default OCSP URI listed in the CA certificate\&. This requires the ocsp\-trustname option to be set to the nick (friendly name) of the OCSP server certificate, which needs to be present in the NSS database\&. These option combined with the next option sets the OCSP \fIdefault responder\fR\&. .RE .PP \fBocsp\-trustname\fR .RS 4 The nickname of the certificate that has been imported into the NSS database of the server handling the OCSP requests\&. This requires the ocsp\-uri option to be set as well\&. This option and the previous options sets the OCSP \fIdefault responder\fR\&. .RE .PP \fBocsp\-cache\-size\fR .RS 4 The maximum size (in number of certificates) of OCSP responses that will be kept in the cache\&. The default is 1000\&. Setting this value to 0 means the cache is disabled\&. .RE .PP \fBocsp\-cache\-min\-age\fR .RS 4 The minimum age (in seconds) before a new fetch will be attempted\&. The default is 1 hour\&. .RE .PP \fBocsp\-cache\-max\-age\fR .RS 4 The maximum age (in seconds) before a new fetch will be attempted\&. The default is 1 day\&. .RE .PP \fBforwardcontrol\fR .RS 4 This option is obsolete and ignored\&. Please use \fBnet\&.ipv4\&.ip_forward\ \&=\ \&0\fR in /etc/sysctl\&.conf instead to control the ip forwarding behaviour\&. .RE .PP \fBrp_filter\fR .RS 4 This option is obsolete and ignored\&. Please use the \fBnet\&.ipv4\&.conf/[iface]/rp_filter\ \&=\ \&0\fR options in /etc/sysctl\&.conf instead\&. This option is badly documented; it must be 0 in many cases for ipsec to function\&. .RE .PP \fBsyslog\fR .RS 4 the \fBsyslog\fR(2) \(lqfacility\(rq name and priority to use for startup/shutdown log messages, default \fBdaemon\&.error\fR\&. .RE .PP \fBklipsdebug\fR .RS 4 how much KLIPS debugging output should be logged\&. An empty value, or the magic value \fBnone\fR, means no debugging output (the default)\&. The magic value \fBall\fR means full output\&. Otherwise only the specified types of output (a quoted list, names separated by white space) are enabled; for details on available debugging types, see \fBipsec_klipsdebug\fR(8)\&. This KLIPS option has no effect on NETKEY, Windows or BSD stacks\&. .RE .PP \fBplutodebug\fR .RS 4 how much Pluto debugging output should be logged\&. An empty value, or the magic value \fBnone\fR, means no debug output (the default)\&. The magic value \fBall\fR means full output\&. Otherwise only the specified types of output (a quoted list, names without the \fB\-\-debug\-\fR prefix, separated by white space) are enabled; for details on available debugging types, see \fBipsec_pluto\fR(8)\&. .sp A few special debugging options are not included with \fBall\fR and must be specifically added to be enabled\&. These special values currently are \fBprivate\fR (for sensitive key material), \fBcrypt\fR (for all crypto related operations), \fBwhackwatch\fR (to not release the whack when it normally would), and \fBadd\-prefix\fR (for special prefix pre\-pending) .RE .PP \fBuniqueids\fR .RS 4 Whether IDs should be considered identifying remote parties uniquely\&. Acceptable values are \fByes\fR (the default) and \fBno\fR\&. Participant IDs normally are unique, so a new connection instance using the same remote ID is almost invariably intended to replace an old existing connection\&. .sp When the connection is defined to be a server (using xauthserver=) and the connection policy is authby=secret, this option is ignored (as of 3\&.20) and old connections will never be replaced\&. This situation is commonly known as clients using a "Group ID"\&. .sp This option may disappear in the near future\&. People using identical X\&.509 certificates on multiple devices are urged to upgrade to use separate certificates per client and device\&. .RE .PP \fBlogfile\fR .RS 4 do not use syslog, but rather log to stderr, and direct stderr to the argument file\&. This option used to be called plutostderrlog= .RE .PP \fBlogappend\fR .RS 4 If pluto is instructed to log to a file using \fBlogfile=\fR, this option determines whether the log file should be appended to or overwritten\&. Valid options are \fByes\fR (the default) to append and \fBno\fR to overwrite\&. Since on modern systems, pluto is restarted by other daemons, such as systemd, this option should be left at its default yes value to preserve the log entries of previous runs of pluto\&. The option is mainly of use for running the test suite, which needs to create new log files from scratch\&. .RE .PP \fBlogip\fR .RS 4 If pluto is instructed to log the IP address of incoming connections\&. Valid options are \fByes\fR (the default) and \fBno\fR\&. Note that this only affects regular logging\&. Any enabled debugging via \fBplutodebug=\fR will still contain IP addresses of peers\&. This option is mostly meant for servers that want to avoid logging IP addresses of incoming clients\&. Other identifiable information might still be logged, such as ID payloads and X\&.509 certificate details\&. When using ID of type IP address, this option will not hide the actual IP address as part of the ID\&. Most deployments will not want to change this from the default\&. .RE .PP \fBlogtime\fR .RS 4 When pluto is directed to log to a file using \fBlogfile=\fR, this option determines whether or not to log the current timestamp as prefix\&. Values are \fByes\fR (the default) or \fBno\fR\&. The no value can be used to create logs without ephemeral timestamps, such as those created when running the test suite\&. This option used to be called plutostderrlogtime= .RE .PP \fBforce\-busy\fR .RS 4 This option has been obsoleted, please see \fIddos\-mode\fR\&. .RE .PP \fBddos\-mode\fR .RS 4 The startup mode of the DDOS defense mechanism\&. Acceptable values are \fBbusy\fR, \fBunlimited\fR or \fBauto\fR (the default)\&. This option can also be given to the IKE daemon while running, for example by issuing \fIipsec whack \-\-ddos\-\-busy\fR\&. When in busy mode, pluto activates anti\-DDoS counter measures\&. Currently, counter measures consist of requiring IKEv2 anti\-DDoS cookies on new incoming IKE requests, and a more aggressive cleanup of partially established or AUTH_NULL connections\&. .RE .PP \fBddos\-ike\-threshold\fR .RS 4 The number of half\-open IKE SAs before the pluto IKE daemon will be placed in busy mode\&. When in busy mode, pluto activates anti\-DDoS counter measures\&. The default is 25000\&. See also \fBddos\-mode\fR and \fIipsec whack \-\-ddos\-XXX\fR\&. .RE .PP \fBmax\-halfopen\-ike\fR .RS 4 The number of half\-open IKE SAs before the IKE daemon starts refusing all new IKE attempts\&. Established IKE peers are not affected\&. The default value is 50000\&. .RE .PP \fBshuntlifetime\fR .RS 4 The time until bare shunts (kernel policies not associated with connections) are deleted from the kernel\&. The default value is 15m\&. When using Opportunistic Encryption to a specific host fails, the system will either install a %pass or %hold shunt to let the traffic out clear text or block it\&. During the the shuntlifetime, no new Opportunistic Encryption attempt will be started, although the system will still respond to incoming OE requests from the remote IP\&. See also \fBfailureshunt\fR and \fBnegotiationshunt\fR .RE .PP \fBxfrmlifetime\fR .RS 4 The time in seconds until the NETKEY/XFRM acquire state times out\&. The default value is 300 seconds\&. For auto=ondemand connections and Opportunistic connections an IPsec policy is installed in the kernel\&. If an incoming or outgoing packet matches this policy, a state is created in the kernel and the kernel sends an ACQUIRE message to the IKE daemon pluto\&. While this state is in place, no new acquires will come in for this connection\&. The default should be fine for most people\&. One use case of shortening these is if opportunistc encryption is used towards cloud instances that can quickly re\-use IP addresses\&. This value is only used during the libreswan startup process by the ipsec _stackmanager helper\&. See also \fBfailureshunt\fR and \fBnegotiationshunt\fR .RE .PP \fBdumpdir\fR .RS 4 in what directory should things started by \fIsetup\fR (notably the Pluto daemon) be allowed to dump core? The default value is \fI/var/run/pluto\fR\&. When SELinux runs in enforced mode, changing this requires a similar change in the SELinux policy for the pluto daemon\&. .RE .PP \fBstatsbin\fR .RS 4 This option specifies an optional external program to report tunnel state changes too\&. The default is not to report tunnel state changes\&. This program can be used to notify the user\*(Aqs desktop (dbus, NetworkManager) or to report tunnel changes to a central logging server\&. .RE .PP \fBipsecdir\fR .RS 4 Specifies a directory for administrator\-controlled configuration files and directories\&. The default value is \fI/etc/ipsec\&.d\fR\&. It may contain the following files and directories: .PP passwd .RS 4 (optional) for XAUTH support if not using PAM (this file should not be world\-readable)\&. See README\&.XAUTH for more information\&. .RE .PP nsspassword .RS 4 (optional) passwords needed to unlock the NSS database in /var/lib/ipsec/nss (this file should not be world\-readable)\&. See README\&.nss for more information\&. .RE .PP policies/ .RS 4 a directory containing policy group configuration information\&. See \fBPOLICY GROUP FILES\fR in this document for more information\&. .RE .PP cacerts/ .RS 4 DEPRECATED: a directory to store trust anchors (root certificate authority certificates)\&. The preferred (and default) approach is to store CA certs in the NSS database instead\&. See README\&.nss for more information\&. .RE .PP crls/ .RS 4 DEPRECATED: a directory to store certificate revocation lists\&. The preferred (and default) approach is to store CRLs in the NSS database instead\&. See README\&.nss for more information\&. .RE .sp When SELinux runs in enforced mode, changing this requires a similar change in the SELinux policy for the pluto daemon\&. .RE .PP \fBnssdir\fR .RS 4 Specifies a directory for NSS database files\&. The default value is \fI/var/lib/ipsec/nss\fR\&. It may contain the following files: .PP pkcs11\&.txt .RS 4 Detailed info about NSS database creation parameteres\&. .RE .PP cert9\&.db .RS 4 NSS Certificate database\&. .RE .PP key4\&.db .RS 4 NSS Key database\&. .RE .sp When SELinux runs in enforced mode, changing this requires a similar change in the SELinux policy for the pluto daemon\&. .RE .PP \fBsecretsfile\fR .RS 4 pathname of the file that stores the secret credentials such as preshared keys (PSKs)\&. See \fIman ipsec\&.secrets\fR for the syntax\&. The default value is /etc/ipsec\&.secrets\&. .RE .PP \fBperpeerlog\fR .RS 4 if pluto should split the logs in a per\-peer directory\&. Valid options are \fBno\fR(the default) and \fByes\fR\&. When enabled, logging is split into directories based on IP address\&. When disabled, logging is done via syslog or a single log file, as defined by \fBlogfile=\fR .RE .PP \fBperpeerlogdir\fR .RS 4 in what directory the per\-peer log should be created, if enabled via the \fBperpeerlog\fR option\&. This will result in sub directories in the structure /192/0/2\&. The default value is \fI/var/log/pluto/peer/\fR\&. When SELinux runs in enforced mode, changing this requires a similar change in the SELinux policy for the pluto daemon\&. .RE .PP \fBfragicmp\fR .RS 4 whether a tunnel\*(Aqs need to fragment a packet should be reported back with an ICMP message, in an attempt to make the sender lower his PMTU estimate; acceptable values are \fBno\fR (the default) and \fByes\fR\&. This KLIPS option has no effect on NETKEY, Windows or BSD stacks\&. .RE .PP \fBhidetos\fR .RS 4 whether a tunnel packet\*(Aqs TOS field should be set to 0 rather than copied from the user packet inside; acceptable values are \fByes\fR (the default) and \fBno\fR\&. This KLIPS option has no effect on NETKEY, Windows or BSD stacks\&. .RE .PP \fBoverridemtu\fR .RS 4 value that the MTU of the ipsec\fIn\fR interface(s) should be set to, overriding IPsec\*(Aqs (large) default\&. This parameter is needed only in special situations\&. This KLIPS option has no effect on NETKEY, Windows or BSD stacks\&. .RE .PP \fBseccomp\fR .RS 4 Set the seccomp kernel syscall whitelisting feature\&. When set to \fIenabled\fR, if pluto calls a syscall that is not on the compiled\-in whitelist, the kernel will assume an exploit is attempting to use pluto for malicious access to the system and terminate the pluto daemon\&. When set to \fItolerant\fR, the kernel will only block the rogue syscall and pluto will attempt to continue\&. If set to \fIdisabled\fR, pluto is allowed to call any syscall offered by the kernel, although it might be restricted via other security mechanisms, such as capabilities, SElinux, AppArmor or other OS security features\&. .sp The current default is disabled, but it is expected that in the future this feature will be enabled on all supported operating systems\&. Similarly, it is expected that further privilege separation will reduce the allowed syscalls \- for example for the crypto helpers or DNS helpers\&. .sp \fBWarning:\fR The restrictions of pluto are inherited by the updown scripts, so these scripts are also not allowed to use syscalls that are forbidden for pluto\&. .sp This feature can be tested using \fIipsec whack \-\-seccomp\-crashtest\fR\&. \fBWarning: \fR With seccomp=enabled, pluto will be terminated by the kernel\&. With seccomp=tolerant or seccomp=disabled, pluto will report the results of the seccomp test\&. SECCOMP will log the forbidden syscall numbers to the audit log, but only with seccomp=enabled\&. The tool scmp_sys_resolver from the libseccomp development package can be used to translate the syscall number into a name\&. See programs/pluto/pluto_seccomp\&.c for the list of allowed syscalls\&. .RE .SH "IMPLICIT CONNS" .PP The system automatically defines several conns to implement default policy groups\&. Each can be overridden by explicitly defining a new conn with the same name\&. If the new conn has \fBauto=ignore\fR, the definition is suppressed\&. .PP Here are the automatically supplied definitions\&. .sp .if n \{\ .RS 4 .\} .nf \fB conn clear type=passthrough authby=never left=%defaultroute right=%group auto=route conn clear\-or\-private type=passthrough left=%defaultroute leftid=%myid right=%opportunisticgroup failureshunt=passthrough keyingtries=3 ikelifetime=1h salifetime=1h rekey=no auto=route conn private\-or\-clear type=tunnel left=%defaultroute leftid=%myid right=%opportunisticgroup failureshunt=passthrough keyingtries=3 ikelifetime=1h salifetime=1h rekey=no auto=route conn private type=tunnel left=%defaultroute leftid=%myid right=%opportunisticgroup failureshunt=drop keyingtries=3 ikelifetime=1h salifetime=1h rekey=no auto=route conn block type=reject authby=never left=%defaultroute right=%group auto=route # default policy conn packetdefault type=tunnel left=%defaultroute leftid=%myid left=0\&.0\&.0\&.0/0 right=%opportunistic failureshunt=passthrough keyingtries=3 ikelifetime=1h salifetime=1h rekey=no auto=route \fR .fi .if n \{\ .RE .\} .PP These conns are \fInot\fR affected by anything in \fBconn %default\fR\&. They will only work if \fB%defaultroute\fR works\&. The \fBleftid\fR will be the interfaces IP address; this requires that reverse DNS records be set up properly\&. .PP The implicit conns are defined after all others\&. It is appropriate and reasonable to use \fBalso=private\-or\-clear\fR (for example) in any other opportunistic conn\&. .SH "POLICY GROUP FILES" .PP The optional files under /etc/ipsec\&.d/policies, including .sp .if n \{\ .RS 4 .\} .nf /etc/ipsec\&.d/policies/clear /etc/ipsec\&.d/policies/clear\-or\-private /etc/ipsec\&.d/policies/private\-or\-clear /etc/ipsec\&.d/policies/private /etc/ipsec\&.d/policies/block .fi .if n \{\ .RE .\} .PP may contain policy group configuration information to supplement \fIipsec\&.conf\fR\&. Their contents are not security\-sensitive\&. .PP These files are text files\&. Each consists of a list of CIDR blocks, one per line\&. White space followed by # followed by anything to the end of the line is a comment and is ignored, as are empty lines\&. .PP A connection in ipsec\&.conf that has \fBright=%group\fR or \fBright=%opportunisticgroup\fR is a policy group connection\&. When a policy group file of the same name is loaded, with .PP \ \&\ \&\ \&\ \&\ \&\fBipsec auto \-\-rereadgroups\fR .PP or at system start, the connection is instantiated such that each CIDR block serves as an instance\*(Aqs \fBright\fR value\&. The system treats the resulting instances as normal connections\&. .PP For example, given a suitable connection definition \fBprivate\fR, and the file /etc/ipsec\&.d/policies/private with an entry 192\&.0\&.2\&.3, the system creates a connection instance \fBprivate#192\&.0\&.2\&.3\&.\fR This connection inherits all details from \fBprivate\fR, except that its right client is 192\&.0\&.2\&.3\&. .SH "DEFAULT POLICY GROUPS" .PP The standard Libreswan install includes several policy groups which provide a way of classifying possible peers into IPsec security classes: \fBprivate\fR (talk encrypted only), \fBprivate\-or\-clear\fR (prefer encryption), \fBclear\-or\-private\fR (respond to requests for encryption), \fBclear\fR and \fBblock\fR\&. Implicit policy groups apply to the local host only, and are implemented by the \fBIMPLICIT CONNECTIONS\fR described above\&. .SH "OBSOLETE" .PP Various options have recently been obsoleted and are ignored\&. The options \fBprepluto=\fR and \fBplutopost=\fR have been obsoleted because these were used by the (obsoleted) shell wrappers launching the pluto daemon\&. If this functionality is needed, look at your initsystem for support\&. For example, the \fBsystemd\fR initsystem has the options \fBExecStartPre=\fR and \fBExecStopPost=\fR to accomplish the same\&. The option \fBplutoopts=\fR has also been obsoleted for this reason\&. A replacement can be found in the \fBPLUTO_OPTS\fR environment variable in the file \fB/etc/sysconfig/pluto\fR (Fedora/RHEL) or \fB/etc/defaults/pluto\fR (Debian/Ubuntu)\&. The last two options obsoleted by the removal of the old shell scripts are \fBpluto=\fR and \fBplutowait=\fR\&. .PP The following ipsec commands have been obsoleted: \fBipsec _confread\fR, \fBipsec _include\fR, \fBipsec _plutoload\fR, \fBipsec _realsetup\fR, \fBipsec _startklips\fR and \fBipsec _startnetkey\fR due to the new parsing and startup methods and \fBipsec copyright\fR, \fBipsec lwdnsq\fR, \fBipsec mailkey\fR, \fBipsec policy\fR, \fBipsec showdefaults\fR and \fBipsec showpolicy\fR because they were no longer needed or current\&. .SH "CHOOSING A CONNECTION [THIS SECTION IS EXTREMELY OUT OF DATE" .PP When choosing a connection to apply to an outbound packet caught with a \fB%trap,\fR the system prefers the one with the most specific eroute that includes the packet\*(Aqs source and destination IP addresses\&. Source subnets are examined before destination subnets\&. For initiating, only routed connections are considered\&. For responding, unrouted but added connections are considered\&. .PP When choosing a connection to use to respond to a negotiation that doesn\*(Aqt match an ordinary conn, an opportunistic connection may be instantiated\&. Eventually, its instance will be /32 \-> /32, but for earlier stages of the negotiation, there will not be enough information about the client subnets to complete the instantiation\&. .SH "FILES" .sp .if n \{\ .RS 4 .\} .nf /etc/ipsec\&.conf /etc/ipsec\&.d/policies/clear /etc/ipsec\&.d/policies/clear\-or\-private /etc/ipsec\&.d/policies/private\-or\-clear /etc/ipsec\&.d/policies/private /etc/ipsec\&.d/policies/block .fi .if n \{\ .RE .\} .SH "SEE ALSO" .PP \fBipsec\fR(8), \fBipsec_auto\fR(8), \fBipsec_rsasigkey\fR(8) .SH "HISTORY" .PP Designed for the FreeS/WAN project <\m[blue]\fBhttp://www\&.freeswan\&.org\fR\m[]> by Henry Spencer\&. .SH "BUGS" .PP Before reporting new bugs, please ensure you are using the latest version of Libreswan, and if not using KLIPS, please ensure you are using the latest kernel code for your IPsec stack\&. .PP When \fBtype\fR or \fBfailureshunt\fR is set to \fBdrop\fR or \fBreject,\fR Libreswan blocks outbound packets using eroutes, but assumes inbound blocking is handled by the firewall\&. Libreswan offers firewall hooks via an \(lqupdown\(rq script\&. However, the default \fBipsec _updown\fR provides no help in controlling a modern firewall\&. .PP Including attributes of the keying channel (authentication methods, \fBikelifetime\fR, etc\&.) as an attribute of a connection, rather than of a participant pair, is dubious and incurs limitations\&. .PP The use of \fB%any\fR with the \fIprotoport=\fR option is ambiguous\&. Should the SA permits any port through or should the SA negotiate any single port through? The first is a basic conn with a wildcard\&. The second is a template\&. The second is the current behaviour, and it\*(Aqs wrong for quite a number of uses involving TCP\&. The keyword \fB%one\fR may be introduced in the future to separate these two cases\&. .PP It would be good to have a line\-continuation syntax, especially for the very long lines involved in RSA signature keys\&. .PP \fBFirst packet caching\fR is only implemented for the KLIPS(NG) and MAST stacks\&. NETKEY returns POSIX\-breaking responses, visible as \fIconnect: Resource temporarily unavailable\fR errors\&. This affects Opportunistic Encryption and DPD\&. Functionality on the BSD and Windows stacks is unknown\&. .PP Some state information is only available when using KLIPS, and will return errors on other IPsec stacks\&. These include \fIipsec eroute\fR, \fIipsec spi\fR and \fIipsec look\fR\&. .PP Multiple L2TP clients behind the same NAT router, and multiple L2TP clients behind different NAT routers using the same Virtual IP is currently only working for the KLIPSNG stack\&. .PP The ability to specify different identities, \fBauthby\fR, and public keys for different automatic\-keyed connections between the same participants is misleading; this doesn\*(Aqt work dependably because the identity of the participants is not known early enough\&. This is especially awkward for the \(lqRoad Warrior\(rq case, where the remote IP address is specified as 0\&.0\&.0\&.0, and that is considered to be the \(lqparticipant\(rq for such connections\&. .PP In principle it might be necessary to control MTU on an interface\-by\-interface basis, rather than with the single global override that \fBoverridemtu\fR provides\&. This feature is planned for a future release\&. .PP If conns are to be added before DNS is available, \fBleft=\fR\fIFQDN\fR, \fBleftnextop=\fR\fIFQDN\fR, and \fBleftrsasigkey=%dnsonload\fR will fail\&. \fBipsec_pluto\fR(8) does not actually use the public key for our side of a conn but it isn\*(Aqt generally known at a add\-time which side is ours (Road Warrior and Opportunistic conns are currently exceptions)\&. .PP The \fBmyid\fR option does not affect explicit \fB ipsec auto \-\-add\fR or \fBipsec auto \-\-replace\fR commands for implicit conns\&. .SH "AUTHOR" .PP \fBPaul Wouters\fR .RS 4 documenter .RE