Introduction to strongSwan: IKEv2 Remote Access Client Configuration » History » Version 2
Tobias Brunner, 19.01.2016 11:21
1 | 1 | Tobias Brunner | h1. Introduction to strongSwan: IKEv2 Remote Access Client Configuration |
---|---|---|---|
2 | 1 | Tobias Brunner | |
3 | 2 | Tobias Brunner | This is the example IKEv2 client configuration as mentioned in [[IntroductionTostrongSwan#IKEv2-Windows-78-Linux-Android-4-Mac-OS-X-iOS-8|Introduction to strongSwan]]. |
4 | 1 | Tobias Brunner | |
5 | 1 | Tobias Brunner | h2. [[ipsec.conf]] |
6 | 1 | Tobias Brunner | |
7 | 1 | Tobias Brunner | <pre> |
8 | 1 | Tobias Brunner | conn ikev2-rw |
9 | 1 | Tobias Brunner | right=gateway.host.name |
10 | 1 | Tobias Brunner | rightid=%gateway.host.name |
11 | 1 | Tobias Brunner | rightsubnet=0.0.0.0/0 |
12 | 1 | Tobias Brunner | rightauth=pubkey |
13 | 1 | Tobias Brunner | leftsourceip=%config |
14 | 1 | Tobias Brunner | leftauth=pubkey or eap, depending on the selected gateway config |
15 | 1 | Tobias Brunner | leftcert=certificate, only if leftauth=pubkey (e.g. peerCert.der) |
16 | 1 | Tobias Brunner | eap_identity=username, only if leftauth=eap (e.g. peer) |
17 | 1 | Tobias Brunner | auto=add |
18 | 1 | Tobias Brunner | </pre> |
19 | 1 | Tobias Brunner | |
20 | 1 | Tobias Brunner | The @%@ syntax for _rightid_ was added with [[5.0.1]]. In earlier releases you must set it to the identity used on the gateway, |
21 | 1 | Tobias Brunner | that is, the value of _leftid_ in the gateway config, which defaults to the subject of the certificate. |
22 | 1 | Tobias Brunner | |
23 | 1 | Tobias Brunner | _rightsubnet=0.0.0.0/0_ allows the gateway to optionally narrow the traffic that is eventually tunneled to its liking or actually |
24 | 1 | Tobias Brunner | allow the client to tunnel all traffic (also see [[ForwardingAndSplitTunneling|Forwarding and Split-Tunneling]]). |
25 | 1 | Tobias Brunner | |
26 | 1 | Tobias Brunner | _leftsourceip=%config_ will request a [[VirtualIP|virtual IP address]] from the gateway, which may also send other attributes like |
27 | 1 | Tobias Brunner | DNS servers. |
28 | 1 | Tobias Brunner | |
29 | 1 | Tobias Brunner | h2. [[ipsec.secrets]] |
30 | 1 | Tobias Brunner | |
31 | 1 | Tobias Brunner | <pre> |
32 | 1 | Tobias Brunner | # either of these two lines depending on leftauth above |
33 | 1 | Tobias Brunner | : RSA <private_key.file> "passphrase to decrypt key, if any" |
34 | 1 | Tobias Brunner | <username> : EAP "password" |
35 | 1 | Tobias Brunner | </pre> |
36 | 1 | Tobias Brunner | |
37 | 1 | Tobias Brunner | Then copy the CA certificate to [[IpsecDirectoryCacerts|ipsec.d/cacerts]]. This is required to verify the gateway certificate. |
38 | 1 | Tobias Brunner | |
39 | 1 | Tobias Brunner | If certificate based authentication is used, copy the client certificate to [[IpsecDirectoryCerts|ipsec.d/certs]] and the private key |
40 | 1 | Tobias Brunner | to [[IpsecDirectoryPrivate|ipsec.d/private]]. |
41 | 1 | Tobias Brunner | |
42 | 1 | Tobias Brunner | If EAP authentication is used, the password may also be configured with the @ipsec stroke user-creds@ |
43 | 1 | Tobias Brunner | command after starting strongSwan. |