PageRenderTime 53ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/strongswan-5.0.0/man/ipsec.secrets.5.in

#
Autoconf | 181 lines | 173 code | 6 blank | 2 comment | 20 complexity | ccc56f8bafea21a8a88256c35d6ffe70 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0
  1. .TH IPSEC.SECRETS 5 "2011-12-14" "@IPSEC_VERSION@" "strongSwan"
  2. .SH NAME
  3. ipsec.secrets \- secrets for IKE/IPsec authentication
  4. .SH DESCRIPTION
  5. The file \fIipsec.secrets\fP holds a table of secrets.
  6. These secrets are used by the strongSwan Internet Key Exchange (IKE) daemons
  7. pluto (IKEv1) and charon (IKEv2) to authenticate other hosts.
  8. .LP
  9. It is vital that these secrets be protected. The file should be owned
  10. by the super-user,
  11. and its permissions should be set to block all access by others.
  12. .LP
  13. The file is a sequence of entries and include directives.
  14. Here is an example.
  15. .LP
  16. .RS
  17. .nf
  18. # /etc/ipsec.secrets - strongSwan IPsec secrets file
  19. 192.168.0.1 %any : PSK "v+NkxY9LLZvwj4qCC2o/gGrWDF2d21jL"
  20. : RSA moonKey.pem
  21. alice@strongswan.org : EAP "x3.dEhgN"
  22. carol : XAUTH "4iChxLT3"
  23. dave : XAUTH "ryftzG4A"
  24. # get secrets from other files
  25. include ipsec.*.secrets
  26. .fi
  27. .RE
  28. .LP
  29. Each entry in the file is a list of optional ID selectors, followed by a secret.
  30. The two parts are separated by a colon (\fB:\fP) that is surrounded
  31. by whitespace. If no ID selectors are specified the line must start with a
  32. colon.
  33. .LP
  34. A selector is an IP address, a Fully Qualified Domain Name, user@FQDN,
  35. \fB%any\fP or \fB%any6\fP (other kinds may come). An IP address may be written
  36. in the familiar dotted quad form or as a domain name to be looked up
  37. when the file is loaded.
  38. In many cases it is a bad idea to use domain names because
  39. the name server may not be running or may be insecure. To denote a
  40. Fully Qualified Domain Name (as opposed to an IP address denoted by
  41. its domain name), precede the name with an at sign (\fB@\fP).
  42. .LP
  43. Matching IDs with selectors is fairly straightforward: they have to be
  44. equal. In the case of a ``Road Warrior'' connection, if an equal
  45. match is not found for the Peer's ID, and it is in the form of an IP
  46. address, a selector of \fB%any\fP will match the peer's IP address if IPV4
  47. and \fB%any6\fP will match a the peer's IP address if IPV6.
  48. Currently, the obsolete notation \fB0.0.0.0\fP may be used in place of
  49. \fB%any\fP.
  50. .LP
  51. In IKEv1 an additional complexity
  52. arises in the case of authentication by preshared secret: the
  53. responder will need to look up the secret before the Peer's ID payload has
  54. been decoded, so the ID used will be the IP address.
  55. .LP
  56. To authenticate a connection between two hosts, the entry that most
  57. specifically matches the host and peer IDs is used. An entry with no
  58. selectors will match any host and peer. More specifically, an entry with one
  59. selector will match a host and peer if the selector matches the host's ID (the
  60. peer isn't considered). Still more specifically, an entry with multiple
  61. selectors will match a host and peer if the host ID and peer ID each match one
  62. of the selectors. If the key is for an asymmetric authentication technique
  63. (i.e. a public key system such as RSA), an entry with multiple selectors will
  64. match a host and peer even if only the host ID matches a selector (it is
  65. presumed that the selectors are all identities of the host).
  66. It is acceptable for two entries to be the best match as
  67. long as they agree about the secret or private key.
  68. .LP
  69. Authentication by preshared secret requires that both systems find the
  70. identical secret (the secret is not actually transmitted by the IKE
  71. protocol). If both the host and peer appear in the selector list, the
  72. same entry will be suitable for both systems so verbatim copying
  73. between systems can be used. This naturally extends to larger groups
  74. sharing the same secret. Thus multiple-selector entries are best for PSK
  75. authentication.
  76. .LP
  77. Authentication by public key systems such as RSA requires that each host
  78. have its own private key. A host could reasonably use a different private keys
  79. for different interfaces and for different peers. But it would not
  80. be normal to share entries between systems. Thus thus no-selector and
  81. one-selector forms of entry often make sense for public key authentication.
  82. .LP
  83. The key part of an entry must start with a token indicating the kind of
  84. key. The following types of secrets are currently supported:
  85. .TP
  86. .B PSK
  87. defines a pre-shared key
  88. .TP
  89. .B RSA
  90. defines an RSA private key
  91. .TP
  92. .B ECDSA
  93. defines an ECDSA private key
  94. .TP
  95. .B EAP
  96. defines EAP credentials
  97. .TP
  98. .B XAUTH
  99. defines XAUTH credentials
  100. .TP
  101. .B PIN
  102. defines a smartcard PIN
  103. .LP
  104. Details on each type of secret are given below.
  105. .LP
  106. Whitespace at the end of a line is ignored. At the start of a line or
  107. after whitespace, \fB#\fP and the following text up to the end of the
  108. line is treated as a comment.
  109. .LP
  110. An include directive causes the contents of the named file to be processed
  111. before continuing with the current file. The filename is subject to
  112. ``globbing'' as in \fIsh\fP(1), so every file with a matching name
  113. is processed. Includes may be nested to a modest
  114. depth (10, currently). If the filename doesn't start with a \fB/\fP, the
  115. directory containing the current file is prepended to the name. The
  116. include directive is a line that starts with the word \fBinclude\fP,
  117. followed by whitespace, followed by the filename (which must not contain
  118. whitespace).
  119. .SS TYPES OF SECRETS
  120. .TP
  121. .B [ <selectors> ] : PSK <secret>
  122. A preshared \fIsecret\fP is most conveniently represented as a sequence of
  123. characters, which is delimited by double-quote characters (\fB"\fP).
  124. The sequence cannot contain newline or double-quote characters.
  125. .br
  126. Alternatively, preshared secrets can be represented as hexadecimal or Base64
  127. encoded binary values. A character sequence beginning with
  128. .B 0x
  129. is interpreted as sequence of hexadecimal digits.
  130. Similarly, a character sequence beginning with
  131. .B 0s
  132. is interpreted as Base64 encoded binary data.
  133. .TP
  134. .B [ <selectors> ] : RSA <private key file> [ <passphrase> | %prompt ]
  135. .TQ
  136. .B [ <selectors> ] : ECDSA <private key file> [ <passphrase> | %prompt ]
  137. For the private key file both absolute paths or paths relative to
  138. \fI/etc/ipsec.d/private\fP are accepted. If the private key file is
  139. encrypted, the \fIpassphrase\fP must be defined. Instead of a passphrase
  140. .B %prompt
  141. can be used which then causes the daemons to ask the user for the password
  142. whenever it is required to decrypt the key.
  143. .TP
  144. .B <user id> : EAP <secret>
  145. The format of \fIsecret\fP is the same as that of \fBPSK\fP secrets.
  146. .br
  147. \fBEAP\fP secrets are IKEv2 only.
  148. .TP
  149. .B [ <servername> ] <username> : XAUTH <password>
  150. The format of \fIpassword\fP is the same as that of \fBPSK\fP secrets.
  151. \fBXAUTH\fP secrets are IKEv1 only.
  152. .TP
  153. .B : PIN <smartcard selector> <pin code> | %prompt
  154. IKEv1 uses the format
  155. .B "%smartcard[<slot nr>[:<key id>]]"
  156. to specify the smartcard selector (e.g. %smartcard1:50).
  157. The IKEv2 daemon supports multiple modules with the format
  158. .B "%smartcard[<slot nr>[@<module>]]:<keyid>"
  159. , but always requires a keyid to uniquely select the correct key. Instead of
  160. specifying the pin code statically,
  161. .B %prompt
  162. can be specified, which causes the daemons to ask the user for the pin code.
  163. .LP
  164. .SH FILES
  165. /etc/ipsec.secrets
  166. .SH SEE ALSO
  167. ipsec.conf(5), strongswan.conf(5), ipsec(8)
  168. .br
  169. .SH HISTORY
  170. Originally written for the FreeS/WAN project by D. Hugh Redelmeier.
  171. Updated and extended for the strongSwan project <http://www.strongswan.org> by
  172. Tobias Brunner and Andreas Steffen.
  173. .SH BUGS
  174. If an ID is \fB0.0.0.0\fP, it will match \fB%any\fP;
  175. if it is \fB0::0\fP, it will match \fB%any6\fP.