swanctl.opt 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325
  1. connections { # }
  2. Section defining IKE connection configurations.
  3. Section defining IKE connection configurations.
  4. The connections section defines IKE connection configurations, each in
  5. its own subsections. In the keyword description below, the connection
  6. is named _<conn>_, but an arbitrary yet unique connection name can be
  7. chosen for each connection subsection.
  8. connections.<conn> { # }
  9. Section for an IKE connection named <conn>.
  10. connections.<conn>.version = 0
  11. IKE major version to use for connection.
  12. IKE major version to use for connection. _1_ uses IKEv1 aka ISAKMP, _2_
  13. uses IKEv2. A connection using the default of _0_ accepts both IKEv1
  14. and IKEv2 as responder, and initiates the connection actively with IKEv2.
  15. connections.<conn>.local_addrs = %any
  16. Local address(es) to use for IKE communication, comma separated.
  17. Local address(es) to use for IKE communication, comma separated. Takes
  18. single IPv4/IPv6 addresses, DNS names, CIDR subnets or IP address ranges.
  19. As initiator, the first non-range/non-subnet is used to initiate the
  20. connection from. As responder, the local destination address must match at
  21. least to one of the specified addresses, subnets or ranges.
  22. If FQDNs are assigned they are resolved every time a configuration lookup
  23. is done. If DNS resolution times out, the lookup is delayed for that time.
  24. connections.<conn>.remote_addrs = %any
  25. Remote address(es) to use for IKE communication, comma separated.
  26. Remote address(es) to use for IKE communication, comma separated. Takes
  27. single IPv4/IPv6 addresses, DNS names, CIDR subnets or IP address ranges.
  28. As initiator, the first non-range/non-subnet is used to initiate the
  29. connection to. As responder, the initiator source address must match at
  30. least to one of the specified addresses, subnets or ranges.
  31. If FQDNs are assigned they are resolved every time a configuration lookup
  32. is done. If DNS resolution times out, the lookup is delayed for that time.
  33. To initiate a connection, at least one specific address or DNS name must
  34. be specified.
  35. connections.<conn>.local_port = 500
  36. Local UDP port for IKE communication.
  37. Local UDP port for IKE communication. By default the port of the socket
  38. backend is used, which is usually _500_. If port _500_ is used, automatic
  39. IKE port floating to port 4500 is used to work around NAT issues.
  40. Using a non-default local IKE port requires support from the socket backend
  41. in use (socket-dynamic).
  42. connections.<conn>.remote_port = 500
  43. Remote UDP port for IKE communication.
  44. Remote UDP port for IKE communication. If the default of port _500_ is used,
  45. automatic IKE port floating to port 4500 is used to work around NAT issues.
  46. connections.<conn>.proposals = default
  47. Comma separated proposals to accept for IKE.
  48. A proposal is a set of algorithms. For non-AEAD algorithms, this includes
  49. for IKE an encryption algorithm, an integrity algorithm, a pseudo random
  50. function and a Diffie-Hellman group. For AEAD algorithms, instead of
  51. encryption and integrity algorithms, a combined algorithm is used.
  52. In IKEv2, multiple algorithms of the same kind can be specified in a single
  53. proposal, from which one gets selected. In IKEv1, only one algorithm per
  54. kind is allowed per proposal, more algorithms get implicitly stripped. Use
  55. multiple proposals to offer different algorithms combinations in IKEv1.
  56. Algorithm keywords get separated using dashes. Multiple proposals may be
  57. separated by commas. The special value _default_ forms a default proposal
  58. of supported algorithms considered safe, and is usually a good choice
  59. for interoperability.
  60. connections.<conn>.vips =
  61. Virtual IPs to request in configuration payload / Mode Config.
  62. Comma separated list of virtual IPs to request in IKEv2 configuration
  63. payloads or IKEv1 Mode Config. The wildcard addresses _0.0.0.0_ and _::_
  64. request an arbitrary address, specific addresses may be defined. The
  65. responder may return a different address, though, or none at all.
  66. connections.<conn>.aggressive = no
  67. Use Aggressive Mode in IKEv1.
  68. Enables Aggressive Mode instead of Main Mode with Identity Protection.
  69. Aggressive Mode is considered less secure, because the ID and HASH
  70. payloads are exchanged unprotected. This allows a passive attacker to
  71. snoop peer identities, and even worse, start dictionary attacks on the
  72. Preshared Key.
  73. connections.<conn>.pull = yes
  74. Set the Mode Config mode to use.
  75. If the default of _yes_ is used, Mode Config works in pull mode, where
  76. the initiator actively requests a virtual IP. With _no_, push mode is used,
  77. where the responder pushes down a virtual IP to the initiating peer.
  78. Push mode is currently supported for IKEv1, but not in IKEv2. It is used
  79. by a few implementations only, pull mode is recommended.
  80. connections.<conn>.dscp = 000000
  81. Differentiated Services Field Codepoint to set on outgoing IKE packets (six
  82. binary digits).
  83. Differentiated Services Field Codepoint to set on outgoing IKE packets for
  84. this connection. The value is a six digit binary encoded string specifying
  85. the Codepoint to set, as defined in RFC 2474.
  86. connections.<conn>.encap = no
  87. Enforce UDP encapsulation by faking NAT-D payloads.
  88. To enforce UDP encapsulation of ESP packets, the IKE daemon can fake the
  89. NAT detection payloads. This makes the peer believe that NAT takes
  90. place on the path, forcing it to encapsulate ESP packets in UDP.
  91. Usually this is not required, but it can help to work around connectivity
  92. issues with too restrictive intermediary firewalls.
  93. connections.<conn>.mobike = yes
  94. Enables MOBIKE on IKEv2 connections.
  95. Enables MOBIKE on IKEv2 connections. MOBIKE is enabled by default on IKEv2
  96. connections, and allows mobility of clients and multi-homing on servers by
  97. migrating active IPsec tunnels.
  98. Usually keeping MOBIKE enabled is unproblematic, as it is not used if the
  99. peer does not indicate support for it. However, due to the design of MOBIKE,
  100. IKEv2 always floats to port 4500 starting from the second exchange. Some
  101. implementations don't like this behavior, hence it can be disabled.
  102. connections.<conn>.dpd_delay = 0s
  103. Interval of liveness checks (DPD).
  104. Interval to check the liveness of a peer actively using IKEv2 INFORMATIONAL
  105. exchanges or IKEv1 R_U_THERE messages. Active DPD checking is only enforced
  106. if no IKE or ESP/AH packet has been received for the configured DPD delay.
  107. connections.<conn>.dpd_timeout = 0s
  108. Timeout for DPD checks (IKEV1 only).
  109. Charon by default uses the normal retransmission mechanism and timeouts to
  110. check the liveness of a peer, as all messages are used for liveness
  111. checking. For compatibility reasons, with IKEv1 a custom interval may be
  112. specified; this option has no effect on connections using IKE2.
  113. connections.<conn>.fragmentation = yes
  114. Use IKE UDP datagram fragmentation (_yes_, _accept_, _no_ or _force_).
  115. Use IKE fragmentation (proprietary IKEv1 extension or RFC 7383 IKEv2
  116. fragmentation). Acceptable values are _yes_ (the default), _accept_,
  117. _force_ and _no_. If set to _yes_, and the peer supports it, oversized IKE
  118. messages will be sent in fragments. If set to _accept_, support for
  119. fragmentation is announced to the peer but the daemon does not send its own
  120. messages in fragments. If set to _force_ (only supported for IKEv1) the
  121. initial IKE message will already be fragmented if required. Finally, setting
  122. the option to _no_ will disable announcing support for this feature.
  123. Note that fragmented IKE messages sent by a peer are always accepted
  124. irrespective of the value of this option (even when set to _no_).
  125. connections.<conn>.childless = allow
  126. Use childless IKE_SA initiation (_allow_, _force_ or _never_).
  127. Use childless IKE_SA initiation (RFC 6023) for IKEv2. Acceptable values
  128. are _allow_ (the default), _force_ and _never_. If set to _allow_,
  129. responders will accept childless IKE_SAs (as indicated via notify in the
  130. IKE_SA_INIT response) while initiators continue to create regular IKE_SAs
  131. with the first CHILD_SA created during IKE_AUTH, unless the IKE_SA is
  132. initiated explicitly without any children (which will fail if the responder
  133. does not support or has disabled this extension). If set to _force_, only
  134. childless initiation is accepted and the first CHILD_SA is created with a
  135. separate CREATE_CHILD_SA exchange (e.g. to use an independent DH exchange
  136. for all CHILD_SAs). Finally, setting the option to _never_ disables support
  137. for childless IKE_SAs as responder.
  138. connections.<conn>.send_certreq = yes
  139. Send certificate requests payloads (_yes_ or _no_).
  140. Send certificate request payloads to offer trusted root CA certificates
  141. to the peer. Certificate requests help the peer to choose an appropriate
  142. certificate/private key for authentication and are enabled by default.
  143. Disabling certificate requests can be useful if too many trusted root CA
  144. certificates are installed, as each certificate request increases the size
  145. of the initial IKE packets.
  146. connections.<conn>.send_cert = ifasked
  147. Send certificate payloads (_always_, _never_ or _ifasked_).
  148. Send certificate payloads when using certificate authentication. With the
  149. default of _ifasked_ the daemon sends certificate payloads only if
  150. certificate requests have been received. _never_ disables sending of
  151. certificate payloads altogether, _always_ causes certificate payloads to be
  152. sent unconditionally whenever certificate authentication is used.
  153. connections.<conn>.ppk_id =
  154. String identifying the Postquantum Preshared Key (PPK) to be used.
  155. connections.<conn>.ppk_required = no
  156. Whether a Postquantum Preshared Key (PPK) is required for this connection.
  157. connections.<conn>.keyingtries = 1
  158. Number of retransmission sequences to perform during initial connect.
  159. Number of retransmission sequences to perform during initial connect.
  160. Instead of giving up initiation after the first retransmission sequence with
  161. the default value of _1_, additional sequences may be started according to
  162. the configured value. A value of _0_ initiates a new sequence until the
  163. connection establishes or fails with a permanent error.
  164. connections.<conn>.unique = no
  165. Connection uniqueness policy (_never_, _no_, _keep_ or _replace_).
  166. Connection uniqueness policy to enforce. To avoid multiple connections
  167. from the same user, a uniqueness policy can be enforced. The value _never_
  168. does never enforce such a policy, even if a peer included INITIAL_CONTACT
  169. notification messages, whereas _no_ replaces existing connections for the
  170. same identity if a new one has the INITIAL_CONTACT notify. _keep_ rejects
  171. new connection attempts if the same user already has an active connection,
  172. _replace_ deletes any existing connection if a new one for the same user
  173. gets established.
  174. To compare connections for uniqueness, the remote IKE identity is used. If
  175. EAP or XAuth authentication is involved, the EAP-Identity or XAuth username
  176. is used to enforce the uniqueness policy instead.
  177. On initiators this setting specifies whether an INITIAL_CONTACT notify is
  178. sent during IKE_AUTH if no existing connection is found with the remote
  179. peer (determined by the identities of the first authentication round).
  180. Unless set to _never_ the client will send a notify.
  181. connections.<conn>.reauth_time = 0s
  182. Time to schedule IKE reauthentication.
  183. Time to schedule IKE reauthentication. IKE reauthentication recreates the
  184. IKE/ISAKMP SA from scratch and re-evaluates the credentials. In asymmetric
  185. configurations (with EAP or configuration payloads) it might not be possible
  186. to actively reauthenticate as responder. The IKEv2 reauthentication lifetime
  187. negotiation can instruct the client to perform reauthentication.
  188. Reauthentication is disabled by default. Enabling it usually may lead
  189. to small connection interruptions, as strongSwan uses a break-before-make
  190. policy with IKEv2 to avoid any conflicts with associated tunnel resources.
  191. connections.<conn>.rekey_time = 4h
  192. Time to schedule IKE rekeying.
  193. IKE rekeying refreshes key material using a Diffie-Hellman exchange, but
  194. does not re-check associated credentials. It is supported in IKEv2 only,
  195. IKEv1 performs a reauthentication procedure instead.
  196. With the default value IKE rekeying is scheduled every 4 hours, minus the
  197. configured **rand_time**. If a **reauth_time** is configured, **rekey_time**
  198. defaults to zero disabling rekeying; explicitly set both to enforce
  199. rekeying and reauthentication.
  200. connections.<conn>.over_time = 10% of rekey_time/reauth_time
  201. Hard IKE_SA lifetime if rekey/reauth does not complete, as time.
  202. Hard IKE_SA lifetime if rekey/reauth does not complete, as time.
  203. To avoid having an IKE/ISAKMP kept alive if IKE reauthentication or rekeying
  204. fails perpetually, a maximum hard lifetime may be specified. If the
  205. IKE_SA fails to rekey or reauthenticate within the specified time, the
  206. IKE_SA gets closed.
  207. In contrast to CHILD_SA rekeying, **over_time** is relative in time to the
  208. **rekey_time** _and_ **reauth_time** values, as it applies to both.
  209. The default is 10% of the longer of **rekey_time** and **reauth_time**.
  210. connections.<conn>.rand_time = over_time
  211. Range of random time to subtract from rekey/reauth times.
  212. Time range from which to choose a random value to subtract from
  213. rekey/reauth times. To avoid having both peers initiating the rekey/reauth
  214. procedure simultaneously, a random time gets subtracted from the
  215. rekey/reauth times.
  216. The default is equal to the configured **over_time**.
  217. connections.<conn>.pools =
  218. Comma separated list of named IP pools.
  219. Comma separated list of named IP pools to allocate virtual IP addresses and
  220. other configuration attributes from. Each name references a pool by name
  221. from either the **pools** section or an external pool.
  222. connections.<conn>.if_id_in = 0
  223. Default inbound XFRM interface ID for children.
  224. XFRM interface ID set on inbound policies/SA, can be overridden by child
  225. config, see there for details.
  226. connections.<conn>.if_id_out = 0
  227. Default outbound XFRM interface ID for children.
  228. XFRM interface ID set on outbound policies/SA, can be overridden by child
  229. config, see there for details.
  230. connections.<conn>.mediation = no
  231. Whether this connection is a mediation connection.
  232. Whether this connection is a mediation connection, that is, whether this
  233. connection is used to mediate other connections using the IKEv2 Mediation
  234. Extension. Mediation connections create no CHILD_SA.
  235. connections.<conn>.mediated_by =
  236. The name of the connection to mediate this connection through.
  237. The name of the connection to mediate this connection through. If given, the
  238. connection will be mediated through the named mediation connection.
  239. The mediation connection must have **mediation** enabled.
  240. connections.<conn>.mediation_peer =
  241. Identity under which the peer is registered at the mediation server.
  242. Identity under which the peer is registered at the mediation server, that
  243. is, the IKE identity the other end of this connection uses as its local
  244. identity on its connection to the mediation server. This is the identity we
  245. request the mediation server to mediate us with. Only relevant on
  246. connections that set **mediated_by**. If it is not given, the remote IKE
  247. identity of the first authentication round of this connection will be used.
  248. connections.<conn>.local<suffix> {}
  249. Section for a local authentication round.
  250. Section for a local authentication round. A local authentication round
  251. defines the rules how authentication is performed for the local peer.
  252. Multiple rounds may be defined to use IKEv2 RFC 4739 Multiple Authentication
  253. or IKEv1 XAuth.
  254. Each round is defined in a section having _local_ as prefix, and an optional
  255. unique suffix. To define a single authentication round, the suffix may be
  256. omitted.
  257. connections.<conn>.local<suffix>.round = 0
  258. Optional numeric identifier by which authentication rounds are sorted. If
  259. not specified rounds are ordered by their position in the config file/VICI
  260. message.
  261. connections.<conn>.local<suffix>.certs =
  262. Comma separated list of certificate candidates to use for authentication.
  263. Comma separated list of certificate candidates to use for authentication.
  264. The certificates may use a relative path from the **swanctl** _x509_
  265. directory or an absolute path.
  266. The certificate used for authentication is selected based on the received
  267. certificate request payloads. If no appropriate CA can be located, the
  268. first certificate is used.
  269. connections.<conn>.local<suffix>.cert<suffix> =
  270. Section for a certificate candidate to use for authentication.
  271. Section for a certificate candidate to use for authentication. Certificates
  272. in _certs_ are transmitted as binary blobs, these sections offer more
  273. flexibility.
  274. connections.<conn>.local<suffix>.cert<suffix>.file =
  275. Absolute path to the certificate to load.
  276. Absolute path to the certificate to load. Passed as-is to the daemon, so it
  277. must be readable by it.
  278. Configure either this or _handle_, but not both, in one section.
  279. connections.<conn>.local<suffix>.cert<suffix>.handle =
  280. Hex-encoded CKA_ID of the certificate on a token.
  281. Hex-encoded CKA_ID of the certificate on a token.
  282. Configure either this or _file_, but not both, in one section.
  283. connections.<conn>.local<suffix>.cert<suffix>.slot =
  284. Optional slot number of the token that stores the certificate.
  285. connections.<conn>.local<suffix>.cert<suffix>.module =
  286. Optional PKCS#11 module name.
  287. connections.<conn>.local<suffix>.pubkeys =
  288. Comma separated list of raw public key candidates to use for authentication.
  289. Comma separated list of raw public key candidates to use for authentication.
  290. The public keys may use a relative path from the **swanctl** _pubkey_
  291. directory or an absolute path.
  292. Even though multiple local public keys could be defined in principle, only
  293. the first public key in the list is used for authentication.
  294. connections.<conn>.local<suffix>.auth = pubkey
  295. Authentication to perform locally (_pubkey_, _psk_, _xauth[-backend]_ or
  296. _eap[-method]_).
  297. Authentication to perform locally. _pubkey_ uses public key authentication
  298. using a private key associated to a usable certificate. _psk_ uses
  299. pre-shared key authentication. The IKEv1 specific _xauth_ is used for
  300. XAuth or Hybrid authentication, while the IKEv2 specific _eap_ keyword
  301. defines EAP authentication.
  302. For _xauth_, a specific backend name may be appended, separated by a dash.
  303. The appropriate _xauth_ backend is selected to perform the XAuth exchange.
  304. For traditional XAuth, the _xauth_ method is usually defined in the second
  305. authentication round following an initial _pubkey_ (or _psk_) round. Using
  306. _xauth_ in the first round performs Hybrid Mode client authentication.
  307. For _eap_, a specific EAP method name may be appended, separated by a dash.
  308. An EAP module implementing the appropriate method is selected to perform
  309. the EAP conversation.
  310. If both peers support RFC 7427 ("Signature Authentication in IKEv2")
  311. specific hash algorithms to be used during IKEv2 authentication may be
  312. configured. To do so use _ike:_ followed by a trust chain signature scheme
  313. constraint (see description of the **remote** section's **auth** keyword).
  314. For example, with _ike:pubkey-sha384-sha256_ a public key signature scheme
  315. with either SHA-384 or SHA-256 would get used for authentication, in that
  316. order and depending on the hash algorithms supported by the peer. If no
  317. specific hash algorithms are configured, the default is to prefer an
  318. algorithm that matches or exceeds the strength of the signature key.
  319. If no constraints with _ike:_ prefix are configured any signature scheme
  320. constraint (without _ike:_ prefix) will also apply to IKEv2 authentication,
  321. unless this is disabled in **strongswan.conf**(5). To use RSASSA-PSS
  322. signatures use _rsa/pss_ instead of _pubkey_ or _rsa_ as in e.g.
  323. _ike:rsa/pss-sha256_. If _pubkey_ or _rsa_ constraints are configured
  324. RSASSA-PSS signatures will only be used if enabled in
  325. **strongswan.conf**(5).
  326. connections.<conn>.local<suffix>.id =
  327. IKE identity to use for authentication round.
  328. IKE identity to use for authentication round. When using certificate
  329. authentication, the IKE identity must be contained in the certificate,
  330. either as subject or as subjectAltName.
  331. The identity can be an IP address, a fully-qualified domain name, an email
  332. address or a Distinguished Name for which the ID type is determined
  333. automatically and the string is converted to the appropriate encoding. To
  334. enforce a specific identity type, a prefix may be used, followed by a colon
  335. (:). If the number sign (#) follows the colon, the remaining data is
  336. interpreted as hex encoding, otherwise the string is used as-is as the
  337. identification data. Note that this implies that no conversion is performed
  338. for non-string identities. For example, _ipv4:10.0.0.1_ does not create a
  339. valid ID_IPV4_ADDR IKE identity, as it does not get converted to binary
  340. 0x0a000001. Instead, one could use _ipv4:#0a000001_ to get a valid identity,
  341. but just using the implicit type with automatic conversion is usually
  342. simpler. The same applies to the ASN1 encoded types. The following prefixes
  343. are known: _ipv4_, _ipv6_, _rfc822_, _email_, _userfqdn_, _fqdn_, _dns_,
  344. _asn1dn_, _asn1gn_ and _keyid_. Custom type prefixes may be specified by
  345. surrounding the numerical type value by curly brackets.
  346. connections.<conn>.local<suffix>.eap_id = id
  347. Client EAP-Identity to use in EAP-Identity exchange and the EAP method.
  348. connections.<conn>.local<suffix>.aaa_id = remote-id
  349. Server side EAP-Identity to expect in the EAP method.
  350. Server side EAP-Identity to expect in the EAP method. Some EAP methods, such
  351. as EAP-TLS, use an identity for the server to perform mutual authentication.
  352. This identity may differ from the IKE identity, especially when EAP
  353. authentication is delegated from the IKE responder to an AAA backend.
  354. For EAP-(T)TLS, this defines the identity for which the server must provide
  355. a certificate in the TLS exchange.
  356. connections.<conn>.local<suffix>.xauth_id = id
  357. Client XAuth username used in the XAuth exchange.
  358. connections.<conn>.remote<suffix> {}
  359. Section for a remote authentication round.
  360. Section for a remote authentication round. A remote authentication round
  361. defines the constraints how the peers must authenticate to use this
  362. connection. Multiple rounds may be defined to use IKEv2 RFC 4739 Multiple
  363. Authentication or IKEv1 XAuth.
  364. Each round is defined in a section having _remote_ as prefix, and an
  365. optional unique suffix. To define a single authentication round, the suffix
  366. may be omitted.
  367. connections.<conn>.remote<suffix>.round = 0
  368. Optional numeric identifier by which authentication rounds are sorted. If
  369. not specified rounds are ordered by their position in the config file/VICI
  370. message.
  371. connections.<conn>.remote<suffix>.id = %any
  372. IKE identity to expect for authentication round.
  373. IKE identity to expect for authentication round. Refer to the _local_ _id_
  374. section for details.
  375. connections.<conn>.remote<suffix>.eap_id = id
  376. Identity to use as peer identity during EAP authentication.
  377. Identity to use as peer identity during EAP authentication. If set to _%any_
  378. the EAP-Identity method will be used to ask the client for an identity.
  379. connections.<conn>.remote<suffix>.groups =
  380. Authorization group memberships to require.
  381. Comma separated authorization group memberships to require. The peer must
  382. prove membership to at least one of the specified groups. Group membership
  383. can be certified by different means, for example by appropriate Attribute
  384. Certificates or by an AAA backend involved in the authentication.
  385. connections.<conn>.remote<suffix>.cert_policy =
  386. Certificate policy OIDs the peer's certificate must have.
  387. Comma separated list of certificate policy OIDs the peer's certificate must
  388. have. OIDs are specified using the numerical dotted representation.
  389. connections.<conn>.remote<suffix>.certs =
  390. Comma separated list of certificate to accept for authentication.
  391. Comma separated list of certificates to accept for authentication.
  392. The certificates may use a relative path from the **swanctl** _x509_
  393. directory or an absolute path.
  394. connections.<conn>.remote<suffix>.cert<suffix> =
  395. Section for a certificate to accept for authentication.
  396. Section for a certificate to accept for authentication. Certificates
  397. in _certs_ are transmitted as binary blobs, these sections offer more
  398. flexibility.
  399. connections.<conn>.remote<suffix>.cert<suffix>.file =
  400. Absolute path to the certificate to load.
  401. Absolute path to the certificate to load. Passed as-is to the daemon, so it
  402. must be readable by it.
  403. Configure either this or _handle_, but not both, in one section.
  404. connections.<conn>.remote<suffix>.cert<suffix>.handle =
  405. Hex-encoded CKA_ID of the certificate on a token.
  406. Hex-encoded CKA_ID of the certificate on a token.
  407. Configure either this or _file_, but not both, in one section.
  408. connections.<conn>.remote<suffix>.cert<suffix>.slot =
  409. Optional slot number of the token that stores the certificate.
  410. connections.<conn>.remote<suffix>.cert<suffix>.module =
  411. Optional PKCS#11 module name.
  412. connections.<conn>.remote<suffix>.cacerts =
  413. Comma separated list of CA certificates to accept for authentication.
  414. Comma separated list of CA certificates to accept for authentication.
  415. The certificates may use a relative path from the **swanctl** _x509ca_
  416. directory or an absolute path.
  417. connections.<conn>.remote<suffix>.cacert<suffix> =
  418. Section for a CA certificate to accept for authentication.
  419. Section for a CA certificate to accept for authentication. Certificates
  420. in _cacerts_ are transmitted as binary blobs, these sections offer more
  421. flexibility.
  422. connections.<conn>.remote<suffix>.cacert<suffix>.file =
  423. Absolute path to the certificate to load.
  424. Absolute path to the certificate to load. Passed as-is to the daemon, so it
  425. must be readable by it.
  426. Configure either this or _handle_, but not both, in one section.
  427. connections.<conn>.remote<suffix>.cacert<suffix>.handle =
  428. Hex-encoded CKA_ID of the CA certificate on a token.
  429. Hex-encoded CKA_ID of the CA certificate on a token.
  430. Configure either this or _file_, but not both, in one section.
  431. connections.<conn>.remote<suffix>.cacert<suffix>.slot =
  432. Optional slot number of the token that stores the CA certificate.
  433. connections.<conn>.remote<suffix>.cacert<suffix>.module =
  434. Optional PKCS#11 module name.
  435. connections.<conn>.remote<suffix>.pubkeys =
  436. Comma separated list of raw public keys to accept for authentication.
  437. Comma separated list of raw public keys to accept for authentication.
  438. The public keys may use a relative path from the **swanctl** _pubkey_
  439. directory or an absolute path.
  440. connections.<conn>.remote<suffix>.revocation = relaxed
  441. Certificate revocation policy, (_strict_, _ifuri_ or _relaxed_).
  442. Certificate revocation policy for CRL or OCSP revocation.
  443. A _strict_ revocation policy fails if no revocation information is
  444. available, i.e. the certificate is not known to be unrevoked.
  445. _ifuri_ fails only if a CRL/OCSP URI is available, but certificate
  446. revocation checking fails, i.e. there should be revocation information
  447. available, but it could not be obtained.
  448. The default revocation policy _relaxed_ fails only if a certificate
  449. is revoked, i.e. it is explicitly known that it is bad.
  450. connections.<conn>.remote<suffix>.auth = pubkey
  451. Authentication to expect from remote (_pubkey_, _psk_, _xauth[-backend]_ or
  452. _eap[-method]_).
  453. Authentication to expect from remote. See the **local** section's **auth**
  454. keyword description about the details of supported mechanisms.
  455. To require a trustchain public key strength for the remote side, specify the
  456. key type followed by the minimum strength in bits (for example _ecdsa-384_
  457. or _rsa-2048-ecdsa-256_). To limit the acceptable set of hashing algorithms
  458. for trustchain validation, append hash algorithms to _pubkey_ or a key
  459. strength definition (for example _pubkey-sha256-sha512_,
  460. _rsa-2048-sha256-sha384-sha512_ or
  461. _rsa-2048-sha256-ecdsa-256-sha256-sha384_).
  462. Unless disabled in **strongswan.conf**(5), or explicit IKEv2 signature
  463. constraints are configured (refer to the description of the **local**
  464. section's **auth** keyword for details), such key types and hash algorithms
  465. are also applied as constraints against IKEv2 signature authentication
  466. schemes used by the remote side. To require RSASSA-PSS signatures use
  467. _rsa/pss_ instead of _pubkey_ or _rsa_ as in e.g. _rsa/pss-sha256_. If
  468. _pubkey_ or _rsa_ constraints are configured RSASSA-PSS signatures will only
  469. be accepted if enabled in **strongswan.conf**(5).
  470. To specify trust chain constraints for EAP-(T)TLS, append a colon to the
  471. EAP method, followed by the key type/size and hash algorithm as discussed
  472. above (e.g. _eap-tls:ecdsa-384-sha384_).
  473. connections.<conn>.children.<child> {}
  474. CHILD_SA configuration sub-section.
  475. CHILD_SA configuration sub-section. Each connection definition may have
  476. one or more sections in its _children_ subsection. The section name
  477. defines the name of the CHILD_SA configuration, which must be unique within
  478. the connection.
  479. connections.<conn>.children.<child>.ah_proposals =
  480. AH proposals to offer for the CHILD_SA.
  481. AH proposals to offer for the CHILD_SA. A proposal is a set of algorithms.
  482. For AH, this includes an integrity algorithm and an optional Diffie-Hellman
  483. group. If a DH group is specified, CHILD_SA/Quick Mode rekeying and initial
  484. negotiation uses a separate Diffie-Hellman exchange using the specified
  485. group (refer to _esp_proposals_ for details).
  486. In IKEv2, multiple algorithms of the same kind can be specified in a single
  487. proposal, from which one gets selected. In IKEv1, only one algorithm per
  488. kind is allowed per proposal, more algorithms get implicitly stripped. Use
  489. multiple proposals to offer different algorithms combinations in IKEv1.
  490. Algorithm keywords get separated using dashes. Multiple proposals may be
  491. separated by commas. The special value _default_ forms a default proposal
  492. of supported algorithms considered safe, and is usually a good choice
  493. for interoperability. By default no AH proposals are included, instead ESP
  494. is proposed.
  495. connections.<conn>.children.<child>.esp_proposals = default
  496. ESP proposals to offer for the CHILD_SA.
  497. ESP proposals to offer for the CHILD_SA. A proposal is a set of algorithms.
  498. For ESP non-AEAD proposals, this includes an integrity algorithm, an
  499. encryption algorithm, an optional Diffie-Hellman group and an optional
  500. Extended Sequence Number Mode indicator. For AEAD proposals, a combined
  501. mode algorithm is used instead of the separate encryption/integrity
  502. algorithms.
  503. If a DH group is specified, CHILD_SA/Quick Mode rekeying and initial
  504. negotiation use a separate Diffie-Hellman exchange using the specified
  505. group. However, for IKEv2, the keys of the CHILD_SA created implicitly with
  506. the IKE_SA will always be derived from the IKE_SA's key material. So any DH
  507. group specified here will only apply when the CHILD_SA is later rekeyed or
  508. is created with a separate CREATE_CHILD_SA exchange. A proposal mismatch
  509. might, therefore, not immediately be noticed when the SA is established, but
  510. may later cause rekeying to fail.
  511. Extended Sequence Number support may be indicated with the _esn_ and _noesn_
  512. values, both may be included to indicate support for both modes. If omitted,
  513. _noesn_ is assumed.
  514. In IKEv2, multiple algorithms of the same kind can be specified in a single
  515. proposal, from which one gets selected. In IKEv1, only one algorithm per
  516. kind is allowed per proposal, more algorithms get implicitly stripped. Use
  517. multiple proposals to offer different algorithms combinations in IKEv1.
  518. Algorithm keywords get separated using dashes. Multiple proposals may be
  519. separated by commas. The special value _default_ forms a default proposal
  520. of supported algorithms considered safe, and is usually a good choice
  521. for interoperability. If no algorithms are specified for AH nor ESP,
  522. the _default_ set of algorithms for ESP is included.
  523. connections.<conn>.children.<child>.sha256_96 = no
  524. Use incorrect 96-bit truncation for HMAC-SHA-256.
  525. HMAC-SHA-256 is used with 128-bit truncation with IPsec. For compatibility
  526. with implementations that incorrectly use 96-bit truncation this option may
  527. be enabled to configure the shorter truncation length in the kernel. This
  528. is not negotiated, so this only works with peers that use the incorrect
  529. truncation length (or have this option enabled).
  530. connections.<conn>.children.<child>.local_ts = dynamic
  531. Local traffic selectors to include in CHILD_SA.
  532. Comma separated list of local traffic selectors to include in CHILD_SA.
  533. Each selector is a CIDR subnet definition, followed by an optional
  534. proto/port selector. The special value _dynamic_ may be used instead of a
  535. subnet definition, which gets replaced by the tunnel outer address or the
  536. virtual IP, if negotiated. This is the default.
  537. A protocol/port selector is surrounded by opening and closing square
  538. brackets. Between these brackets, a numeric or **getservent**(3) protocol
  539. name may be specified. After the optional protocol restriction, an optional
  540. port restriction may be specified, separated by a slash. The port
  541. restriction may be numeric, a **getservent**(3) service name, or the special
  542. value _opaque_ for RFC 4301 OPAQUE selectors. Port ranges may be specified
  543. as well, none of the kernel backends currently support port ranges, though.
  544. When IKEv1 is used only the first selector is interpreted, except if
  545. the Cisco Unity extension plugin is used. This is due to a limitation of the
  546. IKEv1 protocol, which only allows a single pair of selectors per CHILD_SA.
  547. So to tunnel traffic matched by several pairs of selectors when using IKEv1
  548. several children (CHILD_SAs) have to be defined that cover the selectors.
  549. The IKE daemon uses traffic selector narrowing for IKEv1, the same way it is
  550. standardized and implemented for IKEv2. However, this may lead to problems
  551. with other implementations. To avoid that, configure identical selectors in
  552. such scenarios.
  553. connections.<conn>.children.<child>.remote_ts = dynamic
  554. Remote selectors to include in CHILD_SA.
  555. Comma separated list of remote selectors to include in CHILD_SA. See
  556. **local_ts** for a description of the selector syntax.
  557. connections.<conn>.children.<child>.rekey_time = 1h
  558. Time to schedule CHILD_SA rekeying.
  559. Time to schedule CHILD_SA rekeying. CHILD_SA rekeying refreshes key
  560. material, optionally using a Diffie-Hellman exchange if a group is
  561. specified in the proposal.
  562. To avoid rekey collisions initiated by both ends simultaneously, a value
  563. in the range of **rand_time** gets subtracted to form the effective soft
  564. lifetime.
  565. By default CHILD_SA rekeying is scheduled every hour, minus **rand_time**.
  566. connections.<conn>.children.<child>.life_time = rekey_time + 10%
  567. Maximum lifetime before CHILD_SA gets closed, as time.
  568. Maximum lifetime before CHILD_SA gets closed. Usually this hard lifetime
  569. is never reached, because the CHILD_SA gets rekeyed before.
  570. If that fails for whatever reason, this limit closes the CHILD_SA.
  571. The default is 10% more than the **rekey_time**.
  572. connections.<conn>.children.<child>.rand_time = life_time - rekey_time
  573. Range of random time to subtract from **rekey_time**.
  574. Time range from which to choose a random value to subtract from
  575. **rekey_time**. The default is the difference between **life_time** and
  576. **rekey_time**.
  577. connections.<conn>.children.<child>.rekey_bytes = 0
  578. Number of bytes processed before initiating CHILD_SA rekeying.
  579. Number of bytes processed before initiating CHILD_SA rekeying. CHILD_SA
  580. rekeying refreshes key material, optionally using a Diffie-Hellman exchange
  581. if a group is specified in the proposal.
  582. To avoid rekey collisions initiated by both ends simultaneously, a value
  583. in the range of **rand_bytes** gets subtracted to form the effective soft
  584. volume limit.
  585. Volume based CHILD_SA rekeying is disabled by default.
  586. connections.<conn>.children.<child>.life_bytes = rekey_bytes + 10%
  587. Maximum bytes processed before CHILD_SA gets closed.
  588. Maximum bytes processed before CHILD_SA gets closed. Usually this hard
  589. volume limit is never reached, because the CHILD_SA gets rekeyed before.
  590. If that fails for whatever reason, this limit closes the CHILD_SA.
  591. The default is 10% more than **rekey_bytes**.
  592. connections.<conn>.children.<child>.rand_bytes = life_bytes - rekey_bytes
  593. Range of random bytes to subtract from **rekey_bytes**.
  594. Byte range from which to choose a random value to subtract from
  595. **rekey_bytes**. The default is the difference between **life_bytes** and
  596. **rekey_bytes**.
  597. connections.<conn>.children.<child>.rekey_packets = 0
  598. Number of packets processed before initiating CHILD_SA rekeying.
  599. Number of packets processed before initiating CHILD_SA rekeying. CHILD_SA
  600. rekeying refreshes key material, optionally using a Diffie-Hellman exchange
  601. if a group is specified in the proposal.
  602. To avoid rekey collisions initiated by both ends simultaneously, a value
  603. in the range of **rand_packets** gets subtracted to form the effective soft
  604. packet count limit.
  605. Packet count based CHILD_SA rekeying is disabled by default.
  606. connections.<conn>.children.<child>.life_packets = rekey_packets + 10%
  607. Maximum number of packets processed before CHILD_SA gets closed.
  608. Maximum number of packets processed before CHILD_SA gets closed. Usually
  609. this hard packets limit is never reached, because the CHILD_SA gets rekeyed
  610. before. If that fails for whatever reason, this limit closes the CHILD_SA.
  611. The default is 10% more than **rekey_bytes**.
  612. connections.<conn>.children.<child>.rand_packets = life_packets - rekey_packets
  613. Range of random packets to subtract from **packets_bytes**.
  614. Packet range from which to choose a random value to subtract from
  615. **rekey_packets**. The default is the difference between **life_packets**
  616. and **rekey_packets**.
  617. connections.<conn>.children.<child>.updown =
  618. Updown script to invoke on CHILD_SA up and down events.
  619. connections.<conn>.children.<child>.hostaccess = no
  620. Hostaccess variable to pass to **updown** script.
  621. connections.<conn>.children.<child>.mode = tunnel
  622. IPsec Mode to establish (_tunnel_, _transport_, _transport_proxy_, _beet_,
  623. _pass_ or _drop_).
  624. IPsec Mode to establish CHILD_SA with. _tunnel_ negotiates the CHILD_SA
  625. in IPsec Tunnel Mode, whereas _transport_ uses IPsec Transport Mode.
  626. _transport_proxy_ signifying the special Mobile IPv6 Transport Proxy Mode.
  627. _beet_ is the Bound End to End Tunnel mixture mode, working with fixed inner
  628. addresses without the need to include them in each packet.
  629. Both _transport_ and _beet_ modes are subject to mode negotiation; _tunnel_
  630. mode is negotiated if the preferred mode is not available.
  631. _pass_ and _drop_ are used to install shunt policies which explicitly
  632. bypass the defined traffic from IPsec processing or drop it, respectively.
  633. connections.<conn>.children.<child>.policies = yes
  634. Whether to install IPsec policies or not.
  635. Whether to install IPsec policies or not. Disabling this can be useful in
  636. some scenarios e.g. MIPv6, where policies are not managed by the IKE daemon.
  637. connections.<conn>.children.<child>.policies_fwd_out = no
  638. Whether to install outbound FWD IPsec policies or not.
  639. Whether to install outbound FWD IPsec policies or not. Enabling this is
  640. required in case there is a drop policy that would match and block forwarded
  641. traffic for this CHILD_SA.
  642. connections.<conn>.children.<child>.dpd_action = clear
  643. Action to perform on DPD timeout (_clear_, _trap_ or _restart_).
  644. Action to perform for this CHILD_SA on DPD timeout. The default _clear_
  645. closes the CHILD_SA and does not take further action. _trap_ installs
  646. a trap policy, which will catch matching traffic and tries to re-negotiate
  647. the tunnel on-demand. _restart_ immediately tries to re-negotiate the
  648. CHILD_SA under a fresh IKE_SA.
  649. connections.<conn>.children.<child>.ipcomp = no
  650. Enable IPComp compression before encryption.
  651. Enable IPComp compression before encryption. If enabled, IKE tries to
  652. negotiate IPComp compression to compress ESP payload data prior to
  653. encryption.
  654. connections.<conn>.children.<child>.inactivity = 0s
  655. Timeout before closing CHILD_SA after inactivity.
  656. Timeout before closing CHILD_SA after inactivity. If no traffic has
  657. been processed in either direction for the configured timeout, the CHILD_SA
  658. gets closed due to inactivity. The default value of _0_ disables inactivity
  659. checks.
  660. connections.<conn>.children.<child>.reqid = 0
  661. Fixed reqid to use for this CHILD_SA.
  662. Fixed reqid to use for this CHILD_SA. This might be helpful in some
  663. scenarios, but works only if each CHILD_SA configuration is instantiated
  664. not more than once. The default of _0_ uses dynamic reqids, allocated
  665. incrementally.
  666. connections.<conn>.children.<child>.priority = 0
  667. Optional fixed priority for IPsec policies.
  668. Optional fixed priority for IPsec policies. This could be useful to install
  669. high-priority drop policies. The default of _0_ uses dynamically calculated
  670. priorities based on the size of the traffic selectors.
  671. connections.<conn>.children.<child>.interface =
  672. Optional interface name to restrict IPsec policies.
  673. connections.<conn>.children.<child>.mark_in = 0/0x00000000
  674. Netfilter mark and mask for input traffic.
  675. Netfilter mark and mask for input traffic. On Linux, Netfilter may require
  676. marks on each packet to match an SA/policy having that option set. This
  677. allows installing duplicate policies and enables Netfilter rules to select
  678. specific SAs/policies for incoming traffic. Note that inbound marks are
  679. only set on policies, by default, unless *mark_in_sa* is enabled. The
  680. special value _%unique_ sets a unique mark on each CHILD_SA instance, beyond
  681. that the value _%unique-dir_ assigns a different unique mark for each
  682. CHILD_SA direction (in/out).
  683. An additional mask may be appended to the mark, separated by _/_. The
  684. default mask if omitted is 0xffffffff.
  685. connections.<conn>.children.<child>.mark_in_sa = no
  686. Whether to set *mark_in* on the inbound SA.
  687. Whether to set *mark_in* on the inbound SA. By default, the inbound mark is
  688. only set on the inbound policy. The tuple destination address, protocol and
  689. SPI is unique and the mark is not required to find the correct SA, allowing
  690. to mark traffic after decryption instead (where more specific selectors may
  691. be used) to match different policies. Marking packets before decryption is
  692. still possible, even if no mark is set on the SA.
  693. connections.<conn>.children.<child>.mark_out = 0/0x00000000
  694. Netfilter mark and mask for output traffic.
  695. Netfilter mark and mask for output traffic. On Linux, Netfilter may require
  696. marks on each packet to match a policy/SA having that option set. This
  697. allows installing duplicate policies and enables Netfilter rules to select
  698. specific policies/SAs for outgoing traffic. The special value _%unique_ sets
  699. a unique mark on each CHILD_SA instance, beyond that the value _%unique-dir_
  700. assigns a different unique mark for each CHILD_SA direction (in/out).
  701. An additional mask may be appended to the mark, separated by _/_. The
  702. default mask if omitted is 0xffffffff.
  703. connections.<conn>.children.<child>.set_mark_in = 0/0x00000000
  704. Netfilter mark applied to packets after the inbound IPsec SA processed them.
  705. Netfilter mark applied to packets after the inbound IPsec SA processed them.
  706. This way it's not necessary to mark packets via Netfilter before decryption
  707. or right afterwards to match policies or process them differently (e.g. via
  708. policy routing).
  709. An additional mask may be appended to the mark, separated by _/_. The
  710. default mask if omitted is 0xffffffff. The special value _%same_ uses
  711. the value (but not the mask) from **mark_in** as mark value, which can be
  712. fixed, _%unique_ or _%unique-dir_.
  713. Setting marks in XFRM input requires Linux 4.19 or higher.
  714. connections.<conn>.children.<child>.set_mark_out = 0/0x00000000
  715. Netfilter mark applied to packets after the outbound IPsec SA processed
  716. them.
  717. Netfilter mark applied to packets after the outbound IPsec SA processed
  718. them. This allows processing ESP packets differently than the original
  719. traffic (e.g. via policy routing).
  720. An additional mask may be appended to the mark, separated by _/_. The
  721. default mask if omitted is 0xffffffff. The special value _%same_ uses
  722. the value (but not the mask) from **mark_out** as mark value, which can be
  723. fixed, _%unique_ or _%unique-dir_.
  724. Setting marks in XFRM output is supported since Linux 4.14. Setting a mask
  725. requires at least Linux 4.19.
  726. connections.<conn>.children.<child>.if_id_in = 0
  727. Inbound XFRM interface ID.
  728. XFRM interface ID set on inbound policies/SA. This allows installing
  729. duplicate policies/SAs and associates them with an interface with the same
  730. ID. The special value _%unique_ sets a unique interface ID on each CHILD_SA
  731. instance, beyond that the value _%unique-dir_ assigns a different unique
  732. interface ID for each CHILD_SA direction (in/out).
  733. connections.<conn>.children.<child>.if_id_out = 0
  734. Outbound XFRM interface ID.
  735. XFRM interface ID set on outbound policies/SA. This allows installing
  736. duplicate policies/SAs and associates them with an interface with the same
  737. ID. The special value _%unique_ sets a unique interface ID on each CHILD_SA
  738. instance, beyond that the value _%unique-dir_ assigns a different unique
  739. interface ID for each CHILD_SA direction (in/out).
  740. The daemon will not install routes for CHILD_SAs that have this option set.
  741. connections.<conn>.children.<child>.tfc_padding = 0
  742. Traffic Flow Confidentiality padding.
  743. Pads ESP packets with additional data to have a consistent ESP packet size
  744. for improved Traffic Flow Confidentiality. The padding defines the minimum
  745. size of all ESP packets sent.
  746. The default value of 0 disables TFC padding, the special value _mtu_ adds
  747. TFC padding to create a packet size equal to the Path Maximum Transfer Unit.
  748. connections.<conn>.children.<child>.replay_window = 32
  749. IPsec replay window to configure for this CHILD_SA.
  750. IPsec replay window to configure for this CHILD_SA. Larger values than the
  751. default of 32 are supported using the Netlink backend only, a value of 0
  752. disables IPsec replay protection.
  753. connections.<conn>.children.<child>.hw_offload = no
  754. Enable hardware offload for this CHILD_SA, if supported by the IPsec
  755. implementation.
  756. Enable hardware offload for this CHILD_SA, if supported by the IPsec
  757. implementation. The value _yes_ enforces offloading and the installation
  758. will fail if it's not supported by either kernel or device. The value _auto_
  759. enables offloading, if it's supported, but the installation does not fail
  760. otherwise.
  761. connections.<conn>.children.<child>.copy_df = yes
  762. Whether to copy the DF bit to the outer IPv4 header in tunnel mode.
  763. Whether to copy the DF bit to the outer IPv4 header in tunnel mode. This
  764. effectively disables Path MTU discovery (PMTUD). Controlling this behavior
  765. is not supported by all kernel interfaces.
  766. connections.<conn>.children.<child>.copy_ecn = yes
  767. Whether to copy the ECN header field to/from the outer IP header in tunnel
  768. mode.
  769. Whether to copy the ECN (Explicit Congestion Notification) header field
  770. to/from the outer IP header in tunnel mode. Controlling this behavior is not
  771. supported by all kernel interfaces.
  772. connections.<conn>.children.<child>.copy_dscp = out
  773. Whether to copy the DSCP header field to/from the outer IP header in tunnel
  774. mode.
  775. Whether to copy the DSCP (Differentiated Services Field Codepoint) header
  776. field to/from the outer IP header in tunnel mode. The value _out_ only
  777. copies the field from the inner to the outer header, the value _in_ does the
  778. opposite and only copies the field from the outer to the inner header when
  779. decapsulating, the value _yes_ copies the field in both directions, and the
  780. value _no_ disables copying the field altogether. Setting this to _yes_ or
  781. _in_ could allow an attacker to adversely affect other traffic at the
  782. receiver, which is why the default is _out_. Controlling this behavior is
  783. not supported by all kernel interfaces.
  784. connections.<conn>.children.<child>.start_action = none
  785. Action to perform after loading the configuration (_none_, _trap_, _start_).
  786. Action to perform after loading the configuration. The default of _none_
  787. loads the connection only, which then can be manually initiated or used as
  788. a responder configuration.
  789. The value _trap_ installs a trap policy, which triggers the tunnel as soon
  790. as matching traffic has been detected. The value _start_ initiates
  791. the connection actively.
  792. When unloading or replacing a CHILD_SA configuration having a
  793. **start_action** different from _none_, the inverse action is performed.
  794. Configurations with _start_ get closed, while such with _trap_ get
  795. uninstalled.
  796. connections.<conn>.children.<child>.close_action = none
  797. Action to perform after a CHILD_SA gets closed (_none_, _trap_, _start_).
  798. Action to perform after a CHILD_SA gets closed by the peer. The default of
  799. _none_ does not take any action, _trap_ installs a trap policy for the
  800. CHILD_SA. _start_ tries to re-create the CHILD_SA.
  801. **close_action** does not provide any guarantee that the CHILD_SA is kept
  802. alive. It acts on explicit close messages only, but not on negotiation
  803. failures. Use trap policies to reliably re-create failed CHILD_SAs.
  804. secrets { # }
  805. Section defining secrets for IKE/EAP/XAuth authentication and private
  806. key decryption.
  807. Section defining secrets for IKE/EAP/XAuth authentication and private key
  808. decryption. The **secrets** section takes sub-sections having a specific
  809. prefix which defines the secret type.
  810. It is not recommended to define any private key decryption passphrases,
  811. as then there is no real security benefit in having encrypted keys. Either
  812. store the key unencrypted or enter the keys manually when loading
  813. credentials.
  814. secrets.eap<suffix> { # }
  815. EAP secret section for a specific secret.
  816. EAP secret section for a specific secret. Each EAP secret is defined in
  817. a unique section having the _eap_ prefix. EAP secrets are used for XAuth
  818. authentication as well.
  819. secrets.xauth<suffix> { # }
  820. XAuth secret section for a specific secret.
  821. XAuth secret section for a specific secret. **xauth** is just an alias
  822. for **eap**, secrets under both section prefixes are used for both EAP and
  823. XAuth authentication.
  824. secrets.eap<suffix>.secret =
  825. Value of the EAP/XAuth secret.
  826. Value of the EAP/XAuth secret. It may either be an ASCII string, a hex
  827. encoded string if it has a _0x_ prefix or a Base64 encoded string if it
  828. has a _0s_ prefix in its value.
  829. secrets.eap<suffix>.id<suffix> =
  830. Identity the EAP/XAuth secret belongs to.
  831. Identity the EAP/XAuth secret belongs to. Multiple unique identities may
  832. be specified, each having an _id_ prefix, if a secret is shared between
  833. multiple users.
  834. secrets.ntlm<suffix> { # }
  835. NTLM secret section for a specific secret.
  836. NTLM secret section for a specific secret. Each NTLM secret is defined in
  837. a unique section having the _ntlm_ prefix. NTLM secrets may only be used for
  838. EAP-MSCHAPv2 authentication.
  839. secrets.ntlm<suffix>.secret =
  840. Value of the NTLM secret.
  841. Value of the NTLM secret, which is the NT Hash of the actual secret, that
  842. is, MD4(UTF-16LE(secret)). The resulting 16-byte value may either be given
  843. as a hex encoded string with a _0x_ prefix or as a Base64 encoded string
  844. with a _0s_ prefix.
  845. secrets.ntlm<suffix>.id<suffix> =
  846. Identity the NTLM secret belongs to.
  847. Identity the NTLM secret belongs to. Multiple unique identities may
  848. be specified, each having an _id_ prefix, if a secret is shared between
  849. multiple users.
  850. secrets.ike<suffix> { # }
  851. IKE preshared secret section for a specific secret.
  852. IKE preshared secret section for a specific secret. Each IKE PSK is defined
  853. in a unique section having the _ike_ prefix.
  854. secrets.ike<suffix>.secret =
  855. Value of the IKE preshared secret.
  856. Value of the IKE preshared secret. It may either be an ASCII string,
  857. a hex encoded string if it has a _0x_ prefix or a Base64 encoded string if
  858. it has a _0s_ prefix in its value.
  859. secrets.ike<suffix>.id<suffix> =
  860. IKE identity the IKE preshared secret belongs to.
  861. IKE identity the IKE preshared secret belongs to. Multiple unique identities
  862. may be specified, each having an _id_ prefix, if a secret is shared between
  863. multiple peers.
  864. secrets.ppk<suffix> { # }
  865. Postquantum Preshared Key (PPK) section for a specific secret.
  866. Postquantum Preshared Key (PPK) section for a specific secret. Each PPK is
  867. defined in a unique section having the _ppk_ prefix.
  868. secrets.ppk<suffix>.secret =
  869. Value of the PPK.
  870. Value of the PPK. It may either be an ASCII string, a hex encoded string if
  871. it has a _0x_ prefix or a Base64 encoded string if it has a _0s_ prefix in
  872. its value. Should have at least 256 bits of entropy for 128-bit security.
  873. secrets.ppk<suffix>.id<suffix> =
  874. PPK identity the PPK belongs to.
  875. PPK identity the PPK belongs to. Multiple unique identities
  876. may be specified, each having an _id_ prefix, if a secret is shared between
  877. multiple peers.
  878. secrets.private<suffix> { # }
  879. Private key decryption passphrase for a key in the _private_ folder.
  880. secrets.private<suffix>.file =
  881. File name in the _private_ folder for which this passphrase should be used.
  882. secrets.private<suffix>.secret
  883. Value of decryption passphrase for private key.
  884. secrets.rsa<suffix> { # }
  885. Private key decryption passphrase for a key in the _rsa_ folder.
  886. secrets.rsa<suffix>.file =
  887. File name in the _rsa_ folder for which this passphrase should be used.
  888. secrets.rsa<suffix>.secret
  889. Value of decryption passphrase for RSA key.
  890. secrets.ecdsa<suffix> { # }
  891. Private key decryption passphrase for a key in the _ecdsa_ folder.
  892. secrets.ecdsa<suffix>.file =
  893. File name in the _ecdsa_ folder for which this passphrase should be used.
  894. secrets.ecdsa<suffix>.secret
  895. Value of decryption passphrase for ECDSA key.
  896. secrets.pkcs8<suffix> { # }
  897. Private key decryption passphrase for a key in the _pkcs8_ folder.
  898. secrets.pkcs8<suffix>.file =
  899. File name in the _pkcs8_ folder for which this passphrase should be used.
  900. secrets.pkcs8<suffix>.secret
  901. Value of decryption passphrase for PKCS#8 key.
  902. secrets.pkcs12<suffix> { # }
  903. PKCS#12 decryption passphrase for a container in the _pkcs12_ folder.
  904. secrets.pkcs12<suffix>.file =
  905. File name in the _pkcs12_ folder for which this passphrase should be used.
  906. secrets.pkcs12<suffix>.secret
  907. Value of decryption passphrase for PKCS#12 container.
  908. secrets.token<suffix> { # }
  909. Definition for a private key that's stored on a token/smartcard.
  910. secrets.token<suffix>.handle =
  911. Hex-encoded CKA_ID of the private key on the token.
  912. secrets.token<suffix>.slot =
  913. Optional slot number to access the token.
  914. secrets.token<suffix>.module =
  915. Optional PKCS#11 module name to access the token.
  916. secrets.token<suffix>.pin =
  917. Optional PIN required to access the key on the token. If none is provided
  918. the user is prompted during an interactive --load-creds call.
  919. pools { # }
  920. Section defining named pools.
  921. Section defining named pools. Named pools may be referenced by connections
  922. with the **pools** option to assign virtual IPs and other configuration
  923. attributes.
  924. pools.<name> { # }
  925. Section defining a single pool with a unique name.
  926. pools.<name>.addrs =
  927. Addresses allocated in pool.
  928. Subnet or range defining addresses allocated in pool. Accepts a single CIDR
  929. subnet defining the pool to allocate addresses from or an address range
  930. (<from>-<to>). Pools must be unique and non-overlapping.
  931. pools.<name>.<attr> =
  932. Comma separated list of additional attributes from type <attr>.
  933. Comma separated list of additional attributes of type **<attr>**. The
  934. attribute type may be one of _dns_, _nbns_, _dhcp_, _netmask_, _server_,
  935. _subnet_, _split_include_ and _split_exclude_ to define addresses or CIDR
  936. subnets for the corresponding attribute types. Alternatively, **<attr>** can
  937. be a numerical identifier, for which string attribute values are accepted
  938. as well.
  939. authorities { # }
  940. Section defining attributes of certification authorities.
  941. authorities.<name> { # }
  942. Section defining a certification authority with a unique name.
  943. authorities.<name>.cacert =
  944. CA certificate belonging to the certification authority.
  945. CA certificate belonging to the certification authority. The certificates
  946. may use a relative path from the **swanctl** _x509ca_ directory or an
  947. absolute path.
  948. Configure one of _cacert_, _file_, or _handle_ per section.
  949. authorities.<name>.file =
  950. Absolute path to the certificate to load.
  951. Absolute path to the certificate to load. Passed as-is to the daemon, so it
  952. must be readable by it.
  953. Configure one of _cacert_, _file_, or _handle_ per section.
  954. authorities.<name>.handle =
  955. Hex-encoded CKA_ID of the CA certificate on a token.
  956. Hex-encoded CKA_ID of the CA certificate on a token.
  957. Configure one of _cacert_, _file_, or _handle_ per section.
  958. authorities.<name>.slot =
  959. Optional slot number of the token that stores the CA certificate.
  960. authorities.<name>.module =
  961. Optional PKCS#11 module name.
  962. authorities.<name>.crl_uris =
  963. Comma-separated list of CRL distribution points.
  964. Comma-separated list of CRL distribution points (ldap, http, or file URI).
  965. authorities.<name>.ocsp_uris =
  966. Comma-separated list of OCSP URIs.
  967. authorities.<name>.cert_uri_base =
  968. Defines the base URI for the Hash and URL feature supported by IKEv2.
  969. Defines the base URI for the Hash and URL feature supported by IKEv2.
  970. Instead of exchanging complete certificates, IKEv2 allows one to send an
  971. URI that resolves to the DER encoded certificate. The certificate URIs are
  972. built by appending the SHA1 hash of the DER encoded certificates to this
  973. base URI.
  974. include conf.d/*.conf
  975. Include config snippets