ipsec.conf.5.in 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478
  1. .TH IPSEC.CONF 5 "2012-06-26" "@PACKAGE_VERSION@" "strongSwan"
  2. .SH NAME
  3. ipsec.conf \- IPsec configuration and connections
  4. .SH DESCRIPTION
  5. The optional
  6. .I ipsec.conf
  7. file
  8. specifies most configuration and control information for the
  9. strongSwan IPsec subsystem.
  10. The major exception is secrets for authentication;
  11. see
  12. .IR ipsec.secrets (5).
  13. Its contents are not security-sensitive.
  14. .PP
  15. The file is a text file, consisting of one or more
  16. .IR sections .
  17. White space followed by
  18. .B #
  19. followed by anything to the end of the line
  20. is a comment and is ignored,
  21. as are empty lines which are not within a section.
  22. .PP
  23. A line which contains
  24. .B include
  25. and a file name, separated by white space,
  26. is replaced by the contents of that file.
  27. If the file name is not a full pathname,
  28. it is considered to be relative to the directory containing the
  29. including file.
  30. Such inclusions can be nested.
  31. Only a single filename may be supplied, and it may not contain white space,
  32. but it may include shell wildcards (see
  33. .IR sh (1));
  34. for example:
  35. .PP
  36. .B include
  37. .B "ipsec.*.conf"
  38. .PP
  39. The intention of the include facility is mostly to permit keeping
  40. information on connections, or sets of connections,
  41. separate from the main configuration file.
  42. This permits such connection descriptions to be changed,
  43. copied to the other security gateways involved, etc.,
  44. without having to constantly extract them from the configuration
  45. file and then insert them back into it.
  46. Note also the
  47. .B also
  48. parameter (described below) which permits splitting a single logical
  49. section (e.g. a connection description) into several actual sections.
  50. .PP
  51. A section
  52. begins with a line of the form:
  53. .PP
  54. .I type
  55. .I name
  56. .PP
  57. where
  58. .I type
  59. indicates what type of section follows, and
  60. .I name
  61. is an arbitrary name which distinguishes the section from others
  62. of the same type.
  63. All subsequent non-empty lines
  64. which begin with white space are part of the section.
  65. Sections of the same type that share the same name are merged.
  66. .PP
  67. Lines within the section are generally of the form
  68. .PP
  69. \ \ \ \ \ \fIparameter\fB=\fIvalue\fR
  70. .PP
  71. (note the mandatory preceding white space).
  72. There can be white space on either side of the
  73. .BR = .
  74. Parameter names are specific to a section type.
  75. .PP
  76. An empty
  77. .I value
  78. stands for the system default value (if any) of the parameter,
  79. i.e. it is roughly equivalent to omitting the parameter line entirely. This may
  80. be useful to clear a setting inherited from a
  81. .B %default
  82. section or via
  83. .B also
  84. parameter (see below).
  85. A
  86. .I value
  87. may contain single spaces (additional white space is reduced to one space).
  88. To preserve white space as written enclose the entire
  89. .I value
  90. in double quotes (\fB"\fR); in such values double quotes themselves may be
  91. escaped by prefixing them with
  92. .B \\\\
  93. characters. A double-quoted string may span multiple lines by ending them with
  94. .B \\\\
  95. characters (following lines don't have to begin with white space, as that will
  96. be preserved). Additionally, the following control characters may be encoded in
  97. double-quoted strings: \\n, \\r, \\t, \\b, \\f.
  98. .PP
  99. Numeric values are specified to be either an ``integer''
  100. (a sequence of digits) or a ``decimal number''
  101. (sequence of digits optionally followed by `.' and another sequence of digits).
  102. .PP
  103. There is currently one parameter which is available in any type of
  104. section:
  105. .TP
  106. .B also
  107. the value is a section name; the parameters of that section are inherited by
  108. the current section. Parameters in the current section always override inherited
  109. parameters, even if an
  110. .B also
  111. follows after them.
  112. The specified section must exist and must have the same section type; it doesn't
  113. if it is defined before or after the current section.
  114. Nesting is permitted, and there may be more than one
  115. .B also
  116. in a single section (parameters from referenced sections are inherited and
  117. overridden in the order of these
  118. .B also
  119. parameters).
  120. .PP
  121. A section with name
  122. .B %default
  123. specifies defaults for sections of the same type. All parameters in it, are
  124. inherited by all other sections of that type.
  125. .PP
  126. Currently there are three types of sections:
  127. a
  128. .B config
  129. section specifies general configuration information for IPsec, a
  130. .B conn
  131. section specifies an IPsec connection, while a
  132. .B ca
  133. section specifies special properties of a certification authority.
  134. .SH "CONN SECTIONS"
  135. A
  136. .B conn
  137. section contains a
  138. .IR "connection specification" ,
  139. defining a network connection to be made using IPsec.
  140. The name given is arbitrary, and is used to identify the connection.
  141. Here's a simple example:
  142. .PP
  143. .ne 10
  144. .nf
  145. .ft B
  146. .ta 1c
  147. conn snt
  148. left=192.168.0.1
  149. leftsubnet=10.1.0.0/16
  150. right=192.168.0.2
  151. rightsubnet=10.1.0.0/16
  152. keyingtries=%forever
  153. auto=add
  154. .ft
  155. .fi
  156. .PP
  157. A note on terminology: There are two kinds of communications going on:
  158. transmission of user IP packets, and gateway-to-gateway negotiations for
  159. keying, rekeying, and general control.
  160. The path to control the connection is called 'ISAKMP SA' in IKEv1
  161. and 'IKE SA' in the IKEv2 protocol. That what is being negotiated, the kernel
  162. level data path, is called 'IPsec SA' or 'Child SA'.
  163. strongSwan previously used two separate keying daemons, \fIpluto\fP and
  164. \fIcharon\fP. This manual does not discuss \fIpluto\fP options anymore, but
  165. only \fIcharon\fP that since strongSwan 5.0 supports both IKEv1 and IKEv2.
  166. .PP
  167. To avoid trivial editing of the configuration file to suit it to each system
  168. involved in a connection,
  169. connection specifications are written in terms of
  170. .I left
  171. and
  172. .I right
  173. participants,
  174. rather than in terms of local and remote.
  175. Which participant is considered
  176. .I left
  177. or
  178. .I right
  179. is arbitrary;
  180. for every connection description an attempt is made to figure out whether
  181. the local endpoint should act as the
  182. .I left
  183. or
  184. .I right
  185. endpoint. This is done by matching the IP addresses defined for both endpoints
  186. with the IP addresses assigned to local network interfaces. If a match is found
  187. then the role (left or right) that matches is going to be considered local.
  188. If no match is found during startup,
  189. .I left
  190. is considered local.
  191. This permits using identical connection specifications on both ends.
  192. There are cases where there is no symmetry; a good convention is to
  193. use
  194. .I left
  195. for the local side and
  196. .I right
  197. for the remote side (the first letters are a good mnemonic).
  198. .PP
  199. Many of the parameters relate to one participant or the other;
  200. only the ones for
  201. .I left
  202. are listed here, but every parameter whose name begins with
  203. .B left
  204. has a
  205. .B right
  206. counterpart,
  207. whose description is the same but with
  208. .B left
  209. and
  210. .B right
  211. reversed.
  212. .PP
  213. Parameters are optional unless marked '(required)'.
  214. .SS "CONN PARAMETERS"
  215. Unless otherwise noted, for a connection to work,
  216. in general it is necessary for the two ends to agree exactly
  217. on the values of these parameters.
  218. .TP
  219. .BR aaa_identity " = <id>"
  220. defines the identity of the AAA backend used during IKEv2 EAP authentication.
  221. This is required if the EAP client uses a method that verifies the server
  222. identity (such as EAP-TLS), but it does not match the IKEv2 gateway identity.
  223. .TP
  224. .BR aggressive " = yes | " no
  225. whether to use IKEv1 Aggressive or Main Mode (the default).
  226. .TP
  227. .BR ah " = <cipher suites>"
  228. comma-separated list of AH algorithms to be used for the connection, e.g.
  229. .BR sha1-sha256-modp1024 .
  230. The notation is
  231. .BR integrity[-dhgroup] .
  232. For IKEv2, multiple algorithms (separated by -) of the same type can be included
  233. in a single proposal. IKEv1 only includes the first algorithm in a proposal.
  234. Only either the
  235. .B ah
  236. or
  237. .B esp
  238. keyword may be used, AH+ESP bundles are not supported.
  239. There is no default AH cipher suite since by default ESP is used.
  240. The daemon adds its extensive default proposal to the configured value. To
  241. restrict it to the configured proposal an
  242. exclamation mark
  243. .RB ( ! )
  244. can be added at the end.
  245. If
  246. .B dh-group
  247. is specified, CHILD_SA/Quick Mode setup and rekeying include a separate
  248. Diffie-Hellman exchange (refer to the
  249. .B esp
  250. keyword for details).
  251. .TP
  252. .BR also " = <name>"
  253. includes conn section
  254. .BR <name> .
  255. .TP
  256. .BR auth " = <value>"
  257. was used by the
  258. .B pluto
  259. IKEv1 daemon to use AH integrity protection for ESP encrypted packets, but is
  260. not supported in charon. The
  261. .B ah
  262. keyword specifies algorithms to use for integrity protection with AH, but
  263. without encryption. AH+ESP bundles are not supported.
  264. .TP
  265. .BR authby " = " pubkey " | rsasig | ecdsasig | psk | secret | never | xauthpsk | xauthrsasig"
  266. how the two security gateways should authenticate each other;
  267. acceptable values are
  268. .B psk
  269. or
  270. .B secret
  271. for pre-shared secrets,
  272. .B pubkey
  273. (the default) for public key signatures as well as the synonyms
  274. .B rsasig
  275. for RSA digital signatures and
  276. .B ecdsasig
  277. for Elliptic Curve DSA signatures.
  278. .B never
  279. can be used if negotiation is never to be attempted or accepted (useful for
  280. shunt-only conns).
  281. Digital signatures are superior in every way to shared secrets.
  282. IKEv1 additionally supports the values
  283. .B xauthpsk
  284. and
  285. .B xauthrsasig
  286. that will enable eXtended AUTHentication (XAUTH) in addition to IKEv1 main mode
  287. based on shared secrets or digital RSA signatures, respectively.
  288. This parameter is deprecated, as two peers do not need to agree on an
  289. authentication method in IKEv2. Use the
  290. .B leftauth
  291. parameter instead to define authentication methods.
  292. .TP
  293. .BR auto " = " ignore " | add | route | start"
  294. what operation, if any, should be done automatically at IPsec startup;
  295. currently-accepted values are
  296. .BR add ,
  297. .BR route ,
  298. .B start
  299. and
  300. .B ignore
  301. (the default).
  302. .B add
  303. loads a connection without starting it.
  304. .B route
  305. loads a connection and installs kernel traps. If traffic is detected between
  306. .B leftsubnet
  307. and
  308. .BR rightsubnet ,
  309. a connection is established.
  310. .B start
  311. loads a connection and brings it up immediately.
  312. .B ignore
  313. ignores the connection. This is equal to deleting a connection from the config
  314. file.
  315. Relevant only locally, other end need not agree on it.
  316. .TP
  317. .BR closeaction " = " none " | clear | hold | restart"
  318. defines the action to take if the remote peer unexpectedly closes a CHILD_SA
  319. (see
  320. .B dpdaction
  321. for meaning of values).
  322. A
  323. .B closeaction should not be
  324. used if the peer uses reauthentication or uniquids checking, as these events
  325. might trigger the defined action when not desired.
  326. .TP
  327. .BR compress " = yes | " no
  328. whether IPComp compression of content is proposed on the connection
  329. (link-level compression does not work on encrypted data,
  330. so to be effective, compression must be done \fIbefore\fR encryption);
  331. acceptable values are
  332. .B yes
  333. and
  334. .B no
  335. (the default). A value of
  336. .B yes
  337. causes the daemon to propose both compressed and uncompressed,
  338. and prefer compressed.
  339. A value of
  340. .B no
  341. prevents the daemon from proposing or accepting compression.
  342. .TP
  343. .BR dpdaction " = " none " | clear | hold | restart"
  344. controls the use of the Dead Peer Detection protocol (DPD, RFC 3706) where
  345. R_U_THERE notification messages (IKEv1) or empty INFORMATIONAL messages (IKEv2)
  346. are periodically sent in order to check the
  347. liveliness of the IPsec peer. The values
  348. .BR clear ,
  349. .BR hold ,
  350. and
  351. .B restart
  352. all activate DPD and determine the action to perform on a timeout. With
  353. .B clear
  354. the connection is closed with no further actions taken.
  355. .B hold
  356. installs a trap policy, which will catch matching traffic and tries to
  357. re-negotiate the connection on demand.
  358. .B restart
  359. will immediately trigger an attempt to re-negotiation the connection.
  360. The default is
  361. .B none
  362. which disables the active sending of DPD messages.
  363. .TP
  364. .BR dpddelay " = " 30s " | <time>"
  365. defines the period time interval with which R_U_THERE messages/INFORMATIONAL
  366. exchanges are sent to the peer. These are only sent if no other traffic is
  367. received. In IKEv2, a value of 0 sends no additional INFORMATIONAL
  368. messages and uses only standard messages (such as those to rekey) to detect
  369. dead peers.
  370. .TP
  371. .BR dpdtimeout " = " 150s " | <time>
  372. defines the timeout interval, after which all connections to a peer are deleted
  373. in case of inactivity. This only applies to IKEv1, in IKEv2 the default
  374. retransmission timeout applies, as every exchange is used to detect dead peers.
  375. .TP
  376. .BR inactivity " = <time>"
  377. defines the timeout interval, after which a CHILD_SA is closed if it did
  378. not send or receive any traffic. The inactivity counter is reset during CHILD_SA
  379. rekeying. This means that the inactivity timeout must be smaller than the
  380. rekeying interval to have any effect.
  381. .TP
  382. .BR eap_identity " = <id>"
  383. defines the identity the client uses to reply to an EAP Identity request.
  384. If defined on the EAP server, the defined identity will be used as peer
  385. identity during EAP authentication. The special value
  386. .B %identity
  387. uses the EAP Identity method to ask the client for an EAP identity. If not
  388. defined, the IKEv2 identity will be used as EAP identity.
  389. .TP
  390. .BR esp " = <cipher suites>"
  391. comma-separated list of ESP encryption/authentication algorithms to be used
  392. for the connection, e.g.
  393. .BR aes128-sha256 .
  394. The notation is
  395. .BR encryption-integrity[-dhgroup][-esnmode] .
  396. For IKEv2, multiple algorithms (separated by -) of the same type can be included
  397. in a single proposal. IKEv1 only includes the first algorithm in a proposal.
  398. Only either the
  399. .B ah
  400. or
  401. .B esp
  402. keyword may be used, AH+ESP bundles are not supported.
  403. Defaults to
  404. .BR aes128-sha256 .
  405. The daemon adds its extensive default proposal to this default
  406. or the configured value. To restrict it to the configured proposal an
  407. exclamation mark
  408. .RB ( ! )
  409. can be added at the end.
  410. .BR Note :
  411. As a responder, the daemon defaults to selecting the first configured proposal
  412. that's also supported by the peer. This may be changed via
  413. .BR strongswan.conf (5)
  414. to selecting the first acceptable proposal sent by the peer instead. In order to
  415. restrict a responder to only accept specific cipher suites, the strict flag
  416. .RB ( ! ,
  417. exclamation mark) can be used, e.g: aes256-sha512-modp4096!
  418. If
  419. .B dh-group
  420. is specified, CHILD_SA/Quick Mode rekeying and initial negotiation use a
  421. separate Diffie-Hellman exchange using the specified group. However, for IKEv2,
  422. the keys of the CHILD_SA created implicitly with the IKE_SA will always be
  423. derived from the IKE_SA's key material. So any DH group specified here will only
  424. apply when the CHILD_SA is later rekeyed or is created with a separate
  425. CREATE_CHILD_SA exchange. Therefore, a proposal mismatch might not immediately
  426. be noticed when the SA is established, but may later cause rekeying to fail.
  427. Valid values for
  428. .B esnmode
  429. are
  430. .B esn
  431. and
  432. .BR noesn .
  433. Specifying both negotiates Extended Sequence Number support with the peer,
  434. the default is
  435. .B noesn.
  436. .TP
  437. .BR forceencaps " = yes | " no
  438. force UDP encapsulation for ESP packets even if no NAT situation is detected.
  439. This may help to surmount restrictive firewalls. In order to force the peer to
  440. encapsulate packets, NAT detection payloads are faked.
  441. .TP
  442. .BR fragmentation " = " yes " | accept | force | no"
  443. whether to use IKE fragmentation (proprietary IKEv1 extension or IKEv2
  444. fragmentation as per RFC 7383). Acceptable values are
  445. .B yes
  446. (the default),
  447. .BR accept ,
  448. .B force
  449. and
  450. .BR no .
  451. If set to
  452. .BR yes ,
  453. and the peer supports it, oversized IKE messages will be sent in fragments. If
  454. set to
  455. .BR accept ,
  456. support for fragmentation is announced to the peer but the daemon does not send
  457. its own messages in fragments. If set to
  458. .B force
  459. (only supported for IKEv1) the initial IKE message will already be fragmented
  460. if required. Finally, setting the option to
  461. .B no
  462. will disable announcing support for this feature.
  463. Note that fragmented IKE messages sent by a peer are always accepted
  464. irrespective of the value of this option (even when set to
  465. .BR no ).
  466. .TP
  467. .BR ike " = <cipher suites>"
  468. comma-separated list of IKE/ISAKMP SA encryption/authentication algorithms
  469. to be used, e.g.
  470. .BR aes128-sha256-modp3072 .
  471. The notation is
  472. .BR encryption-integrity[-prf]-dhgroup .
  473. If no PRF is given, the algorithms defined for integrity are used for the PRF.
  474. The prf keywords are the same as the integrity algorithms, but have a
  475. .B prf
  476. prefix (such as
  477. .BR prfsha1 ,
  478. .B prfsha256
  479. or
  480. .BR prfaesxcbc ).
  481. .br
  482. In IKEv2, multiple algorithms and proposals may be included, such as
  483. .BR aes128-aes256-sha1-modp3072-modp2048,3des-sha1-md5-modp1024 .
  484. Defaults to
  485. .BR aes128-sha256-modp3072 .
  486. The daemon adds its extensive default proposal to this
  487. default or the configured value. To restrict it to the configured proposal an
  488. exclamation mark
  489. .RB ( ! )
  490. can be added at the end.
  491. .BR Note :
  492. As a responder the daemon accepts the first supported proposal received from
  493. the peer. In order to restrict a responder to only accept specific cipher
  494. suites, the strict flag
  495. .RB ( ! ,
  496. exclamation mark) can be used, e.g:
  497. .BR aes256-sha512-modp4096!
  498. .TP
  499. .BR ikedscp " = " 000000 " | <DSCP field>"
  500. Differentiated Services Field Codepoint to set on outgoing IKE packets sent
  501. from this connection. The value is a six digit binary encoded string defining
  502. the Codepoint to set, as defined in RFC 2474.
  503. .TP
  504. .BR ikelifetime " = " 3h " | <time>"
  505. how long the keying channel of a connection (ISAKMP or IKE SA)
  506. should last before being renegotiated. Also see EXPIRY/REKEY below.
  507. .TP
  508. .BR installpolicy " = " yes " | no"
  509. decides whether IPsec policies are installed in the kernel by the charon daemon
  510. for a given connection. Allows peaceful cooperation e.g. with
  511. the Mobile IPv6 daemon mip6d who wants to control the kernel policies.
  512. Acceptable values are
  513. .B yes
  514. (the default) and
  515. .BR no .
  516. .TP
  517. .BR keyexchange " = " ike " | ikev1 | ikev2"
  518. which key exchange protocol should be used to initiate the connection.
  519. Connections marked with
  520. .B ike
  521. use IKEv2 when initiating, but accept any protocol version when responding.
  522. .TP
  523. .BR keyingtries " = " 3 " | <number> | %forever"
  524. how many attempts (a whole number or \fB%forever\fP) should be made to
  525. negotiate a connection, or a replacement for one, before giving up
  526. (default
  527. .BR 3 ).
  528. The value \fB%forever\fP
  529. means 'never give up'.
  530. Relevant only locally, other end need not agree on it.
  531. .TP
  532. .BR left " = <ip address> | <fqdn> | " %any " | <range> | <subnet> "
  533. The IP address of the left participant's public-network interface
  534. or one of several magic values.
  535. The value
  536. .B %any
  537. (the default) for the local endpoint signifies an address to be filled in (by
  538. automatic keying) during negotiation. If the local peer initiates the
  539. connection setup the routing table will be queried to determine the correct
  540. local IP address.
  541. In case the local peer is responding to a connection setup then any IP address
  542. that is assigned to a local interface will be accepted.
  543. The prefix
  544. .B %
  545. in front of a fully-qualified domain name or an IP address will implicitly set
  546. .BR leftallowany =yes.
  547. If
  548. .B %any
  549. is used for the remote endpoint it literally means any IP address.
  550. If an
  551. .B FQDN
  552. is assigned it is resolved every time a configuration lookup is done. If DNS
  553. resolution times out, the lookup is delayed for that time.
  554. To limit the connection to a specific range of hosts, a range (
  555. .BR 10.1.0.0-10.2.255.255
  556. ) or a subnet (
  557. .BR 10.1.0.0/16
  558. ) can be specified, and multiple addresses, ranges and subnets can be separated
  559. by commas. While one can freely combine these items, to initiate the connection
  560. at least one non-range/subnet is required.
  561. Please note that with the usage of wildcards multiple connection descriptions
  562. might match a given incoming connection attempt. The most specific description
  563. is used in that case.
  564. .TP
  565. .BR leftallowany " = yes | " no
  566. a modifier for
  567. .BR left ,
  568. making it behave as
  569. .B %any
  570. although a concrete IP address or domain name has been assigned.
  571. .TP
  572. .BR leftauth " = <auth method>"
  573. Authentication method to use locally (left) or require from the remote (right)
  574. side.
  575. Acceptable values are
  576. .B pubkey
  577. for public key authentication (RSA/ECDSA),
  578. .B psk
  579. for pre-shared key authentication,
  580. .B eap
  581. to (require the) use of the Extensible Authentication Protocol in IKEv2, and
  582. .B xauth
  583. for IKEv1 eXtended Authentication.
  584. To require a trustchain public key strength for the remote side, specify the
  585. key type followed by the minimum strength in bits (for example
  586. .BR ecdsa-384
  587. or
  588. .BR rsa-2048-ecdsa-256 ).
  589. To limit the acceptable set of hashing algorithms for trustchain validation,
  590. append hash algorithms to
  591. .BR pubkey
  592. or a key strength definition (for example
  593. .BR pubkey-sha256-sha512 ,
  594. .BR rsa-2048-sha256-sha384-sha512 ,
  595. or
  596. .BR rsa-2048-sha256-ecdsa-256-sha256-sha384 ).
  597. Unless disabled in
  598. .BR strongswan.conf (5),
  599. or explicit IKEv2 signature constraints are configured (see below), such key
  600. types and hash algorithms are also applied as constraints against IKEv2
  601. signature authentication schemes used by the remote side.
  602. If both peers support RFC 7427 ("Signature Authentication in IKEv2") specific
  603. hash algorithms to be used during IKEv2 authentication may be configured.
  604. The syntax is the same as above, but with ike: prefix. For example, with
  605. .B ike:pubkey-sha384-sha256
  606. a public key signature scheme with either SHA-384 or SHA-256 would get used for
  607. authentication, in that order and depending on the hash algorithms supported by
  608. the peer. If no specific hash algorithms are configured, the default is to
  609. prefer an algorithm that matches or exceeds the strength of the signature key.
  610. If no constraints with ike: prefix are configured any signature scheme
  611. constraint (without ike: prefix) will also apply to IKEv2 authentication, unless
  612. this is disabled in
  613. .BR strongswan.conf (5).
  614. To use or require RSASSA-PSS signatures use rsa/pss instead of rsa as in e.g.
  615. .BR ike:rsa/pss-sha256 .
  616. If \fBpubkey\fR or \fBrsa\fR constraints are configured RSASSA-PSS signatures
  617. will only be used/accepted if enabled in
  618. .BR strongswan.conf (5).
  619. For
  620. .BR eap ,
  621. an optional EAP method can be appended. Currently defined methods are
  622. .BR eap-aka ,
  623. .BR eap-gtc ,
  624. .BR eap-md5 ,
  625. .BR eap-mschapv2 ,
  626. .BR eap-peap ,
  627. .BR eap-sim ,
  628. .BR eap-tls ,
  629. .BR eap-ttls ,
  630. .BR eap-dynamic ,
  631. and
  632. .BR eap-radius .
  633. Alternatively, IANA assigned EAP method numbers are accepted. Vendor specific
  634. EAP methods are defined in the form
  635. .B eap-type-vendor
  636. .RB "(e.g. " eap-7-12345 ).
  637. To specify signature and trust chain constraints for EAP-(T)TLS, append a colon
  638. to the EAP method, followed by the key type/size and hash algorithm as discussed
  639. above. For
  640. .B xauth,
  641. an XAuth authentication backend can be specified, such as
  642. .B xauth-generic
  643. or
  644. .BR xauth-eap .
  645. If XAuth is used in
  646. .BR leftauth ,
  647. Hybrid authentication is used. For traditional XAuth authentication, define
  648. XAuth in
  649. .BR lefauth2 .
  650. .TP
  651. .BR leftauth2 " = <auth method>"
  652. Same as
  653. .BR leftauth ,
  654. but defines an additional authentication exchange. In IKEv1, only XAuth can be
  655. used in the second authentication round. IKEv2 supports multiple complete
  656. authentication rounds using "Multiple Authentication Exchanges" defined
  657. in RFC 4739. This allows, for example, separated authentication
  658. of host and user.
  659. .TP
  660. .BR leftca " = <issuer dn> | %same"
  661. the distinguished name of a certificate authority which is required to
  662. lie in the trust path going from the left participant's certificate up
  663. to the root certification authority.
  664. .B %same
  665. means that the value configured for the right participant should be reused.
  666. .TP
  667. .BR leftca2 " = <issuer dn> | %same"
  668. Same as
  669. .BR leftca ,
  670. but for the second authentication round (IKEv2 only).
  671. .TP
  672. .BR leftcert " = <path>"
  673. the path to the left participant's X.509 certificate. The file can be encoded
  674. either in PEM or DER format. OpenPGP certificates are supported as well.
  675. Both absolute paths or paths relative to \fI/etc/ipsec.d/certs\fP
  676. are accepted. By default
  677. .B leftcert
  678. sets
  679. .B leftid
  680. to the distinguished name of the certificate's subject.
  681. The left participant's ID can be overridden by specifying a
  682. .B leftid
  683. value which must be certified by the certificate, though.
  684. .br
  685. A value in the form
  686. .B %smartcard[<slot nr>[@<module>]]:<keyid>
  687. defines a specific certificate to load from a PKCS#11 backend for this
  688. connection. See ipsec.secrets(5) for details about smartcard definitions.
  689. .B leftcert
  690. is required only if selecting the certificate with
  691. .B leftid
  692. is not sufficient, for example if multiple certificates use the same subject.
  693. .br
  694. Multiple certificate paths or PKCS#11 backends can be specified in a comma
  695. separated list. The daemon chooses the certificate based on the received
  696. certificate requests if possible before enforcing the first.
  697. .TP
  698. .BR leftcert2 " = <path>"
  699. Same as
  700. .B leftcert,
  701. but for the second authentication round (IKEv2 only).
  702. .TP
  703. .BR leftcertpolicy " = <OIDs>"
  704. Comma separated list of certificate policy OIDs the peer's certificate must
  705. have.
  706. OIDs are specified using the numerical dotted representation.
  707. .TP
  708. .BR leftdns " = <servers>"
  709. Comma separated list of DNS server addresses to exchange as configuration
  710. attributes. On the initiator, a server is a fixed IPv4/IPv6 address, or
  711. .BR %config4 / %config6
  712. to request attributes without an address. On the responder,
  713. only fixed IPv4/IPv6 addresses are allowed and define DNS servers assigned
  714. to the client.
  715. .TP
  716. .BR leftfirewall " = yes | " no
  717. whether the left participant is doing forwarding-firewalling
  718. (including masquerading) using iptables for traffic from \fIleftsubnet\fR,
  719. which should be turned off (for traffic to the other subnet)
  720. once the connection is established;
  721. acceptable values are
  722. .B yes
  723. and
  724. .B no
  725. (the default).
  726. May not be used in the same connection description with
  727. .BR leftupdown .
  728. Implemented as a parameter to the default \fBipsec _updown\fR script.
  729. See notes below.
  730. Relevant only locally, other end need not agree on it.
  731. If one or both security gateways are doing forwarding firewalling
  732. (possibly including masquerading),
  733. and this is specified using the firewall parameters,
  734. tunnels established with IPsec are exempted from it
  735. so that packets can flow unchanged through the tunnels.
  736. (This means that all subnets connected in this manner must have
  737. distinct, non-overlapping subnet address blocks.)
  738. This is done by the default \fBipsec _updown\fR script.
  739. In situations calling for more control,
  740. it may be preferable for the user to supply his own
  741. .I updown
  742. script,
  743. which makes the appropriate adjustments for his system.
  744. .TP
  745. .BR leftgroups " = <group list>"
  746. a comma separated list of group names. If the
  747. .B leftgroups
  748. parameter is present then the peer must be a member of at least one
  749. of the groups defined by the parameter.
  750. .TP
  751. .BR leftgroups2 " = <group list>"
  752. Same as
  753. .B leftgroups,
  754. but for the second authentication round defined with
  755. .B leftauth2.
  756. .TP
  757. .BR lefthostaccess " = yes | " no
  758. inserts a pair of INPUT and OUTPUT iptables rules using the default
  759. \fBipsec _updown\fR script, thus allowing access to the host itself
  760. in the case where the host's internal interface is part of the
  761. negotiated client subnet.
  762. Acceptable values are
  763. .B yes
  764. and
  765. .B no
  766. (the default).
  767. .TP
  768. .BR leftid " = <id>"
  769. how the left participant should be identified for authentication;
  770. defaults to
  771. .B left
  772. or the subject of the certificate configured with
  773. .BR leftcert .
  774. If
  775. .B leftcert
  776. is configured the identity has to be confirmed by the certificate.
  777. Can be an IP address, a fully-qualified domain name, an email address or a
  778. Distinguished Name for which the ID type is determined automatically and the
  779. string is converted to the appropriate encoding. The rules for this conversion
  780. are described in IDENTITY PARSING below.
  781. In certain special situations the identity parsing above might be inadequate
  782. or produce the wrong result. Examples are the need to encode a FQDN as KEY_ID or
  783. the string parser being unable to produce the correct binary ASN.1 encoding of
  784. a certificate's DN. For these situations it is possible to enforce a specific
  785. identity type and to provide the binary encoding of the identity. To do this a
  786. prefix may be used, followed by a colon (:). If the number sign (#) follows the
  787. colon, the remaining data is interpreted as hex encoding, otherwise the string
  788. is used as is as the identification data.
  789. .BR Note :
  790. The latter implies that no conversion is performed for non-string identities.
  791. For example,
  792. \fIipv4:10.0.0.1\fP does not create a valid ID_IPV4_ADDR IKE identity, as it
  793. does not get converted to binary 0x0a000001. Instead, one could use
  794. \fIipv4:#0a000001\fP to get a valid identity, but just using the implicit type
  795. with automatic conversion is usually simpler. The same applies to the ASN.1
  796. encoded types. The following prefixes are known:
  797. .BR ipv4 ,
  798. .BR ipv6 ,
  799. .BR rfc822 ,
  800. .BR email ,
  801. .BR userfqdn ,
  802. .BR fqdn ,
  803. .BR dns ,
  804. .BR asn1dn ,
  805. .B asn1gn
  806. and
  807. .BR keyid .
  808. Custom type prefixes may be specified by surrounding the numerical type value by
  809. curly brackets.
  810. For IKEv2 and
  811. .B rightid
  812. the prefix
  813. .B %
  814. in front of the identity prevents the daemon from sending IDr in its IKE_AUTH
  815. request and will allow it to verify the configured identity against the subject
  816. and subjectAltNames contained in the responder's certificate (otherwise it is
  817. only compared with the IDr returned by the responder). The IDr sent by the
  818. initiator might otherwise prevent the responder from finding a config if it
  819. has configured a different value for
  820. .BR leftid .
  821. .TP
  822. .BR leftid2 " = <id>"
  823. identity to use for a second authentication for the left participant
  824. (IKEv2 only); defaults to
  825. .BR leftid .
  826. .TP
  827. .BR leftikeport " = <port>"
  828. UDP port the left participant uses for IKE communication.
  829. If unspecified, port 500 is used with the port floating
  830. to 4500 if a NAT is detected or MOBIKE is enabled. Specifying a local IKE port
  831. different from the default additionally requires a socket implementation that
  832. listens on this port.
  833. .TP
  834. .BR leftprotoport " = <protocol>/<port>"
  835. restrict the traffic selector to a single protocol and/or port. This option
  836. is now deprecated, protocol/port information can be defined for each subnet
  837. directly in
  838. .BR leftsubnet .
  839. .TP
  840. .BR leftsigkey " = <raw public key> | <path to public key>"
  841. the left participant's public key for public key signature authentication,
  842. in PKCS#1 format using hex (0x prefix) or base64 (0s prefix) encoding. With the
  843. optional
  844. .B dns:
  845. or
  846. .B ssh:
  847. prefix in front of 0x or 0s, the public key is expected to be in either
  848. the RFC 3110 (not the full RR, only RSA key part) or RFC 4253 public key format,
  849. respectively.
  850. Also accepted is the path to a file containing the public key in PEM, DER or SSH
  851. encoding. Both absolute paths or paths relative to \fI/etc/ipsec.d/certs\fP
  852. are accepted.
  853. .TP
  854. .BR leftsendcert " = never | no | " ifasked " | always | yes"
  855. Accepted values are
  856. .B never
  857. or
  858. .BR no ,
  859. .B always
  860. or
  861. .BR yes ,
  862. and
  863. .BR ifasked " (the default),"
  864. the latter meaning that the peer must send a certificate request payload in
  865. order to get a certificate in return.
  866. .TP
  867. .BR leftsourceip " = %config4 | %config6 | <ip address>"
  868. Comma separated list of internal source IPs to use in a tunnel, also known as
  869. virtual IP. If the value is one of the synonyms
  870. .BR %config ,
  871. .BR %cfg ,
  872. .BR %modeconfig ,
  873. or
  874. .BR %modecfg ,
  875. an address (from the tunnel address family) is requested from the peer. With
  876. .B %config4
  877. and
  878. .B %config6
  879. an address of the given address family will be requested explicitly.
  880. If an IP address is configured, it will be requested from the responder,
  881. which is free to respond with a different address.
  882. .TP
  883. .BR rightsourceip " = %config | <network>/<netmask> | <from>-<to> | %poolname"
  884. Comma separated list of internal source IPs to use in a tunnel for the remote
  885. peer. If the value is
  886. .B %config
  887. on the responder side, the initiator must propose an address which is then
  888. echoed back. Also supported are address pools expressed as
  889. \fInetwork\fB/\fInetmask\fR
  890. and
  891. \fIfrom\fB-\fIto\fR
  892. or the use of an external IP address pool using %\fIpoolname\fR,
  893. where \fIpoolname\fR is the name of the IP address pool used for the lookup.
  894. .TP
  895. .BR leftsubnet " = <ip subnet>[[<proto/port>]][,...]"
  896. private subnet behind the left participant, expressed as
  897. \fInetwork\fB/\fInetmask\fR;
  898. if omitted, essentially assumed to be \fIleft\fB/32\fR,
  899. signifying that the left end of the connection goes to the left participant
  900. only. Configured subnets of the peers may differ, the protocol narrows it to
  901. the greatest common subnet. In IKEv1, this may lead to problems with other
  902. implementations, make sure to configure identical subnets in such
  903. configurations. IKEv2 supports multiple subnets separated by commas. IKEv1 only
  904. interprets the first subnet of such a definition, unless the Cisco Unity
  905. extension plugin is enabled. This is due to a limitation of the IKEv1 protocol,
  906. which only allows a single pair of subnets per CHILD_SA. So to tunnel several
  907. subnets a conn entry has to be defined and brought up for each pair of subnets.
  908. The optional part after each subnet enclosed in square brackets specifies a
  909. protocol/port to restrict the selector for that subnet.
  910. Examples:
  911. .BR leftsubnet=10.0.0.1[tcp/http],10.0.0.2[6/80] " or"
  912. .BR leftsubnet=fec1::1[udp],10.0.0.0/16[/53] .
  913. Instead of omitting either value
  914. .B %any
  915. can be used to the same effect, e.g.
  916. .BR leftsubnet=fec1::1[udp/%any],10.0.0.0/16[%any/53] .
  917. If the protocol is
  918. .B icmp
  919. or
  920. .B ipv6-icmp
  921. the port is interpreted as ICMP message type if it is less than 256 or as type
  922. and code if it is greater or equal to 256, with the type in the most significant
  923. 8 bits and the code in the least significant 8 bits.
  924. The port value can alternatively take the value
  925. .B %opaque
  926. for RFC 4301 OPAQUE selectors, or a numerical range in the form
  927. .BR 1024-65535 .
  928. None of the kernel backends currently supports opaque or port ranges and uses
  929. .B %any
  930. for policy installation instead.
  931. Instead of specifying a subnet,
  932. .B %dynamic
  933. can be used to replace it with the IKE address, having the same effect
  934. as omitting
  935. .B leftsubnet
  936. completely. Using
  937. .B %dynamic
  938. can be used to define multiple dynamic selectors, each having a potentially
  939. different protocol/port definition.
  940. .TP
  941. .BR leftupdown " = <path>"
  942. what ``updown'' script to run to adjust routing and/or firewalling
  943. when the status of the connection
  944. changes (default
  945. .BR "ipsec _updown" ).
  946. May include positional parameters separated by white space
  947. (although this requires enclosing the whole string in quotes);
  948. including shell metacharacters is unwise.
  949. Relevant only locally, other end need not agree on it. Charon uses the updown
  950. script to insert firewall rules only, since routing has been implemented
  951. directly into the daemon.
  952. .TP
  953. .BR lifebytes " = <number>"
  954. the number of bytes transmitted over an IPsec SA before it expires.
  955. .TP
  956. .BR lifepackets " = <number>"
  957. the number of packets transmitted over an IPsec SA before it expires.
  958. .TP
  959. .BR lifetime " = " 1h " | <time>"
  960. how long a particular instance of a connection
  961. (a set of encryption/authentication keys for user packets) should last,
  962. from successful negotiation to expiry;
  963. acceptable values are an integer optionally followed by
  964. .BR s
  965. (a time in seconds)
  966. or a decimal number followed by
  967. .BR m ,
  968. .BR h ,
  969. or
  970. .B d
  971. (a time
  972. in minutes, hours, or days respectively)
  973. (default
  974. .BR 1h ,
  975. maximum
  976. .BR 24h ).
  977. Normally, the connection is renegotiated (via the keying channel)
  978. before it expires (see
  979. .BR margintime ).
  980. The two ends need not exactly agree on
  981. .BR lifetime ,
  982. although if they do not,
  983. there will be some clutter of superseded connections on the end
  984. which thinks the lifetime is longer. Also see EXPIRY/REKEY below.
  985. .TP
  986. .BR marginbytes " = <number>"
  987. how many bytes before IPsec SA expiry (see
  988. .BR lifebytes )
  989. should attempts to negotiate a replacement begin.
  990. .TP
  991. .BR marginpackets " = <number>"
  992. how many packets before IPsec SA expiry (see
  993. .BR lifepackets )
  994. should attempts to negotiate a replacement begin.
  995. .TP
  996. .BR margintime " = " 9m " | <time>"
  997. how long before connection expiry or keying-channel expiry
  998. should attempts to
  999. negotiate a replacement
  1000. begin; acceptable values as for
  1001. .B lifetime
  1002. (default
  1003. .BR 9m ).
  1004. Relevant only locally, other end need not agree on it. Also see EXPIRY/REKEY
  1005. below.
  1006. .TP
  1007. .BR mark " = <value>[/<mask>]"
  1008. sets an XFRM mark on the inbound policy and outbound
  1009. IPsec SA and policy. If the mask is missing then a default
  1010. mask of
  1011. .B 0xffffffff
  1012. is assumed. The special value
  1013. .B %unique
  1014. assigns a unique value to each newly created IPsec SA. To additionally
  1015. make the mark unique for each IPsec SA direction (in/out) the special value
  1016. .B %unique-dir
  1017. may be used.
  1018. .TP
  1019. .BR mark_in " = <value>[/<mask>]"
  1020. sets an XFRM mark on the inbound policy (not on the SA). If the mask is missing
  1021. then a default mask of
  1022. .B 0xffffffff
  1023. is assumed.
  1024. .TP
  1025. .BR mark_out " = <value>[/<mask>]"
  1026. sets an XFRM mark on the outbound IPsec SA and
  1027. policy. If the mask is missing then a default mask of
  1028. .B 0xffffffff
  1029. is assumed.
  1030. .TP
  1031. .BR mobike " = " yes " | no"
  1032. enables the IKEv2 MOBIKE protocol defined by RFC 4555. Accepted values are
  1033. .B yes
  1034. (the default) and
  1035. .BR no .
  1036. If set to
  1037. .BR no ,
  1038. the charon daemon will not actively propose MOBIKE as initiator and
  1039. ignore the MOBIKE_SUPPORTED notify as responder.
  1040. .TP
  1041. .BR modeconfig " = push | " pull
  1042. defines which mode is used to assign a virtual IP.
  1043. Accepted values are
  1044. .B push
  1045. and
  1046. .B pull
  1047. (the default).
  1048. Push mode is currently not supported with IKEv2.
  1049. The setting must be the same on both sides.
  1050. .TP
  1051. .BR reauth " = " yes " | no"
  1052. whether rekeying of an IKE_SA should also reauthenticate the peer. In IKEv1,
  1053. reauthentication is always done. In IKEv2, a value of
  1054. .B no
  1055. rekeys without uninstalling the IPsec SAs, a value of
  1056. .B yes
  1057. (the default) creates a new IKE_SA from scratch and tries to recreate
  1058. all IPsec SAs.
  1059. .TP
  1060. .BR rekey " = " yes " | no"
  1061. whether a connection should be renegotiated when it is about to expire;
  1062. acceptable values are
  1063. .B yes
  1064. (the default)
  1065. and
  1066. .BR no .
  1067. The two ends need not agree, but while a value of
  1068. .B no
  1069. prevents charon from requesting renegotiation,
  1070. it does not prevent responding to renegotiation requested from the other end,
  1071. so
  1072. .B no
  1073. will be largely ineffective unless both ends agree on it. Also see
  1074. .BR reauth .
  1075. .TP
  1076. .BR rekeyfuzz " = " 100% " | <percentage>"
  1077. maximum percentage by which
  1078. .BR marginbytes ,
  1079. .B marginpackets
  1080. and
  1081. .B margintime
  1082. should be randomly increased to randomize rekeying intervals
  1083. (important for hosts with many connections);
  1084. acceptable values are an integer,
  1085. which may exceed 100,
  1086. followed by a `%'
  1087. (defaults to
  1088. .BR 100% ).
  1089. The value of
  1090. .BR marginTYPE ,
  1091. after this random increase,
  1092. must not exceed
  1093. .B lifeTYPE
  1094. (where TYPE is one of
  1095. .IR bytes ,
  1096. .I packets
  1097. or
  1098. .IR time ).
  1099. The value
  1100. .B 0%
  1101. will suppress randomization.
  1102. Relevant only locally, other end need not agree on it. Also see EXPIRY/REKEY
  1103. below.
  1104. .TP
  1105. .BR replay_window " = " \-1 " | <number>"
  1106. The IPsec replay window size for this connection. With the default of \-1
  1107. the value configured with
  1108. .I charon.replay_window
  1109. in
  1110. .BR strongswan.conf (5)
  1111. is used. Larger values than 32 are supported using the Netlink backend only,
  1112. a value of 0 disables IPsec replay protection.
  1113. .TP
  1114. .BR reqid " = <number>"
  1115. sets the reqid for a given connection to a pre-configured fixed value.
  1116. .TP
  1117. .BR sha256_96 " = " no " | yes"
  1118. HMAC-SHA-256 is used with 128-bit truncation with IPsec. For compatibility
  1119. with implementations that incorrectly use 96-bit truncation this option may be
  1120. enabled to configure the shorter truncation length in the kernel. This is not
  1121. negotiated, so this only works with peers that use the incorrect truncation
  1122. length (or have this option enabled).
  1123. .TP
  1124. .BR tfc " = <value>"
  1125. number of bytes to pad ESP payload data to. Traffic Flow Confidentiality
  1126. is currently supported in IKEv2 and applies to outgoing packets only. The
  1127. special value
  1128. .BR %mtu
  1129. fills up ESP packets with padding to have the size of the MTU.
  1130. .TP
  1131. .BR type " = " tunnel " | transport | transport_proxy | passthrough | drop"
  1132. the type of the connection; currently the accepted values
  1133. are
  1134. .B tunnel
  1135. (the default)
  1136. signifying a host-to-host, host-to-subnet, or subnet-to-subnet tunnel;
  1137. .BR transport ,
  1138. signifying host-to-host transport mode;
  1139. .BR transport_proxy ,
  1140. signifying the special Mobile IPv6 transport proxy mode;
  1141. .BR passthrough ,
  1142. signifying that no IPsec processing should be done at all;
  1143. .BR drop ,
  1144. signifying that packets should be discarded.
  1145. .TP
  1146. .BR xauth " = " client " | server"
  1147. specifies the role in the XAuth protocol if activated by
  1148. .B authby=xauthpsk
  1149. or
  1150. .B authby=xauthrsasig.
  1151. Accepted values are
  1152. .B server
  1153. and
  1154. .B client
  1155. (the default).
  1156. .TP
  1157. .BR xauth_identity " = <id>"
  1158. defines the identity/username the client uses to reply to an XAuth request.
  1159. If not defined, the IKEv1 identity will be used as XAuth identity.
  1160. .SS "CONN PARAMETERS: IKEv2 MEDIATION EXTENSION"
  1161. The following parameters are relevant to IKEv2 Mediation Extension
  1162. operation only.
  1163. .TP
  1164. .BR mediation " = yes | " no
  1165. whether this connection is a mediation connection, ie. whether this
  1166. connection is used to mediate other connections. Mediation connections
  1167. create no child SA. Acceptable values are
  1168. .B no
  1169. (the default) and
  1170. .BR yes .
  1171. .TP
  1172. .BR mediated_by " = <name>"
  1173. the name of the connection to mediate this connection through. If given,
  1174. the connection will be mediated through the named mediation connection.
  1175. The mediation connection must set
  1176. .BR mediation=yes .
  1177. .TP
  1178. .BR me_peerid " = <id>"
  1179. ID as which the peer is known to the mediation server, ie. which the other
  1180. end of this connection uses as its
  1181. .B leftid
  1182. on its connection to the mediation server. This is the ID we request the
  1183. mediation server to mediate us with. If
  1184. .B me_peerid
  1185. is not given, the
  1186. .B rightid
  1187. of this connection will be used as peer ID.
  1188. .SH "CA SECTIONS"
  1189. These are optional sections that can be used to assign special
  1190. parameters to a Certification Authority (CA). Because the daemons
  1191. automatically import CA certificates from \fI/etc/ipsec.d/cacerts\fP,
  1192. there is no need to explicitly add them with a CA section, unless you
  1193. want to assign special parameters (like a CRL) to a CA.
  1194. .TP
  1195. .BR also " = <name>"
  1196. includes ca section
  1197. .BR <name> .
  1198. .TP
  1199. .BR auto " = " ignore " | add"
  1200. currently can have either the value
  1201. .B ignore
  1202. (the default) or
  1203. .BR add .
  1204. .TP
  1205. .BR cacert " = <path>"
  1206. defines a path to the CA certificate either relative to
  1207. \fI/etc/ipsec.d/cacerts\fP or as an absolute path.
  1208. .br
  1209. A value in the form
  1210. .B %smartcard[<slot nr>[@<module>]]:<keyid>
  1211. defines a specific CA certificate to load from a PKCS#11 backend for this CA.
  1212. See ipsec.secrets(5) for details about smartcard definitions.
  1213. .TP
  1214. .BR crluri " = <uri>"
  1215. defines a CRL distribution point (ldap, http, or file URI)
  1216. .TP
  1217. .B crluri1
  1218. synonym for
  1219. .B crluri.
  1220. .TP
  1221. .BR crluri2 " = <uri>"
  1222. defines an alternative CRL distribution point (ldap, http, or file URI)
  1223. .TP
  1224. .TP
  1225. .BR ocspuri " = <uri>"
  1226. defines an OCSP URI.
  1227. .TP
  1228. .B ocspuri1
  1229. synonym for
  1230. .B ocspuri.
  1231. .TP
  1232. .BR ocspuri2 " = <uri>"
  1233. defines an alternative OCSP URI.
  1234. .TP
  1235. .BR certuribase " = <uri>"
  1236. defines the base URI for the Hash and URL feature supported by IKEv2.
  1237. Instead of exchanging complete certificates, IKEv2 allows one to send an URI
  1238. that resolves to the DER encoded certificate. The certificate URIs are built
  1239. by appending the SHA1 hash of the DER encoded certificates to this base URI.
  1240. .SH "CONFIG SECTIONS"
  1241. At present, the only
  1242. .B config
  1243. section known to the IPsec software is the one named
  1244. .BR setup ,
  1245. which contains information used when the software is being started.
  1246. The currently-accepted
  1247. .I parameter
  1248. names in a
  1249. .B config
  1250. .B setup
  1251. section are:
  1252. .TP
  1253. .BR cachecrls " = yes | " no
  1254. if enabled, certificate revocation lists (CRLs) fetched via HTTP or LDAP will
  1255. be cached in
  1256. .I /etc/ipsec.d/crls/
  1257. under a unique file name derived from the certification authority's public key.
  1258. .TP
  1259. .BR charondebug " = <debug list>"
  1260. how much charon debugging output should be logged.
  1261. A comma separated list containing type/level-pairs may
  1262. be specified, e.g:
  1263. .B dmn 3, ike 1, net -1.
  1264. Acceptable values for types are
  1265. .B dmn, mgr, ike, chd, job, cfg, knl, net, asn, enc, lib, esp, tls,
  1266. .B tnc, imc, imv, pts
  1267. and the level is one of
  1268. .B -1, 0, 1, 2, 3, 4
  1269. (for silent, audit, control, controlmore, raw, private). By default, the level
  1270. is set to
  1271. .B 1
  1272. for all types. For more flexibility see LOGGER CONFIGURATION in
  1273. .IR strongswan.conf (5).
  1274. .TP
  1275. .BR strictcrlpolicy " = yes | ifuri | " no
  1276. defines if a fresh CRL must be available in order for the peer authentication
  1277. based on RSA signatures to succeed.
  1278. IKEv2 additionally recognizes
  1279. .B ifuri
  1280. which reverts to
  1281. .B yes
  1282. if at least one CRL URI is defined and to
  1283. .B no
  1284. if no URI is known.
  1285. .TP
  1286. .BR uniqueids " = " yes " | no | never | replace | keep"
  1287. whether a particular participant ID should be kept unique,
  1288. with any new IKE_SA using an ID deemed to replace all old ones using that ID;
  1289. acceptable values are
  1290. .B yes
  1291. (the default),
  1292. .B no
  1293. and
  1294. .BR never .
  1295. Participant IDs normally \fIare\fR unique, so a new IKE_SA using the same ID is
  1296. almost invariably intended to replace an old one. The difference between
  1297. .B no
  1298. and
  1299. .B never
  1300. is that the daemon will replace old IKE_SAs when receiving an INITIAL_CONTACT
  1301. notify if the option is
  1302. .B no
  1303. but will ignore these notifies if
  1304. .B never
  1305. is configured.
  1306. The daemon also accepts the value
  1307. .B replace
  1308. which is identical to
  1309. .B yes
  1310. and the value
  1311. .B keep
  1312. to reject new IKE_SA setups and keep the duplicate established earlier.
  1313. .SH IDENTITY PARSING
  1314. The type and binary encoding of identity strings specified in \fIleftid\fR
  1315. are detected as follows:
  1316. .IP \[bu]
  1317. If the string value contains an equal sign (=) it is assumed to be a
  1318. Distinguished Name, with RDNs separated by commas (,) \fIor\fR slashes (/ - the string
  1319. must start with a slash to use this syntax). An attempt is made to create a
  1320. binary ASN.1 encoding from this string. If that fails the type is set to KEY_ID
  1321. with the literal string value adopted as encoding.
  1322. .IP \[bu]
  1323. If the string value contains an @ the type depends on the position of that
  1324. character:
  1325. .RS
  1326. .IP \[bu]
  1327. If the string begins with @# the type is set to KEY_ID and the string following
  1328. that prefix is assumed to be the hex-encoded binary value of the identity.
  1329. .IP \[bu]
  1330. If the string begins with @@ the type is set to USER_FQDN and the encoding is
  1331. the literal string after that prefix.
  1332. .IP \[bu]
  1333. If the string begins with @ the type is set to FQDN and the encoding is the
  1334. literal string after that prefix.
  1335. .IP \[bu]
  1336. All remaining strings containing an @ are assumed to be of type USER_FQDN/RFC822
  1337. with the literal string value as encoding.
  1338. .RE
  1339. .IP \[bu]
  1340. If the value does not contain any @ or = characters it is parsed as follows:
  1341. .RS
  1342. .IP \[bu]
  1343. If the value is an empty string, or equals %any[6], 0.0.0.0, ::, or * the
  1344. type is set to ID_ANY, which matches any other identity.
  1345. .IP \[bu]
  1346. If the value contains a colon (:) it is assumed to be an IPv6 address. But if
  1347. parsing the address and converting it to its binary encoding fails the type is
  1348. set to KEY_ID and the encoding is the literal value.
  1349. .IP \[bu]
  1350. For all other strings an attempt at parsing them as IPv4 addresses is made. If
  1351. that fails the type is set to FQDN and the literal value is adopted as
  1352. encoding (this is where domain names and simple names end up).
  1353. .RE
  1354. .SH SA EXPIRY/REKEY
  1355. The IKE SAs and IPsec SAs negotiated by the daemon can be configured to expire
  1356. after a specific amount of time. For IPsec SAs this can also happen after a
  1357. specified number of transmitted packets or transmitted bytes. The following
  1358. settings can be used to configure this:
  1359. .TS
  1360. l r l r,- - - -,lB s lB s,a r a r.
  1361. Setting Default Setting Default
  1362. IKE SA IPsec SA
  1363. ikelifetime 3h lifebytes -
  1364. lifepackets -
  1365. lifetime 1h
  1366. .TE
  1367. .SS Rekeying
  1368. IKE SAs as well as IPsec SAs can be rekeyed before they expire. This can be
  1369. configured using the following settings:
  1370. .TS
  1371. l r l r,- - - -,lB s lB s,a r a r.
  1372. Setting Default Setting Default
  1373. IKE and IPsec SA IPsec SA
  1374. margintime 9m marginbytes -
  1375. marginpackets -
  1376. .TE
  1377. .SS Randomization
  1378. To avoid collisions the specified margins are increased randomly before
  1379. subtracting them from the expiration limits (see formula below). This is
  1380. controlled by the
  1381. .B rekeyfuzz
  1382. setting:
  1383. .TS
  1384. l r,- -,lB s,a r.
  1385. Setting Default
  1386. IKE and IPsec SA
  1387. rekeyfuzz 100%
  1388. .TE
  1389. .PP
  1390. Randomization can be disabled by setting
  1391. .BR rekeyfuzz " to " 0% .
  1392. .SS Formula
  1393. The following formula is used to calculate the rekey time of IPsec SAs:
  1394. .PP
  1395. .EX
  1396. rekeytime = lifetime - (margintime + random(0, margintime * rekeyfuzz))
  1397. .EE
  1398. .PP
  1399. It applies equally to IKE SAs and byte and packet limits for IPsec SAs.
  1400. .SS Example
  1401. Let's consider the default configuration:
  1402. .PP
  1403. .EX
  1404. lifetime = 1h
  1405. margintime = 9m
  1406. rekeyfuzz = 100%
  1407. .EE
  1408. .PP
  1409. From the formula above follows that the rekey time lies between:
  1410. .PP
  1411. .EX
  1412. rekeytime_min = 1h - (9m + 9m) = 42m
  1413. rekeytime_max = 1h - (9m + 0m) = 51m
  1414. .EE
  1415. .PP
  1416. Thus, the daemon will attempt to rekey the IPsec SA at a random time
  1417. between 42 and 51 minutes after establishing the SA. Or, in other words,
  1418. between 9 and 18 minutes before the SA expires.
  1419. .SS Notes
  1420. .IP \[bu]
  1421. Since the rekeying of an SA needs some time, the margin values must not be
  1422. too low.
  1423. .IP \[bu]
  1424. The value
  1425. .B margin... + margin... * rekeyfuzz
  1426. must not exceed the original limit. For example, specifying
  1427. .B margintime = 30m
  1428. in the default configuration is a bad idea as there is a chance that the rekey
  1429. time equals zero and, thus, rekeying gets disabled.
  1430. .SH FILES
  1431. .nf
  1432. /etc/ipsec.conf
  1433. /etc/ipsec.d/aacerts
  1434. /etc/ipsec.d/acerts
  1435. /etc/ipsec.d/cacerts
  1436. /etc/ipsec.d/certs
  1437. /etc/ipsec.d/crls
  1438. .SH SEE ALSO
  1439. strongswan.conf(5), ipsec.secrets(5), ipsec(8)
  1440. .SH HISTORY
  1441. Originally written for the FreeS/WAN project by Henry Spencer.
  1442. Updated and extended for the strongSwan project <http://www.strongswan.org> by
  1443. Tobias Brunner, Andreas Steffen and Martin Willi.