-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gris Ge <[email protected]>
- Loading branch information
Showing
3 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<!-- vim-markdown-toc GFM --> | ||
|
||
* [IPsec x509/PKI authentication example](#ipsec-x509pki-authentication-example) | ||
* [IPsec RSA authentication example](#ipsec-rsa-authentication-example) | ||
* [IPsec PSK authentication example](#ipsec-psk-authentication-example) | ||
|
||
<!-- vim-markdown-toc --> | ||
|
||
#### IPsec x509/PKI authentication example | ||
|
||
```yml | ||
--- | ||
interfaces: | ||
- name: hosta_conn | ||
type: ipsec | ||
ipv4: | ||
enabled: true | ||
dhcp: true | ||
libreswan: | ||
ipsec-interface: "99" | ||
left: 192.0.2.251 | ||
leftid: '%fromcert' | ||
leftcert: hosta.example.org | ||
right: 192.0.2.151 | ||
rightid: '%fromcert' | ||
ikev2: insist | ||
ikelifetime: 24h | ||
salifetime: 24h | ||
``` | ||
The PKI key should be imported by `ipsec import` command or other NSS tools. | ||
|
||
### IPsec RSA authentication example | ||
|
||
|
||
```yml | ||
--- | ||
interfaces: | ||
- name: hosta_conn | ||
type: ipsec | ||
ipv4: | ||
enabled: true | ||
dhcp: true | ||
libreswan: | ||
ipsec-interface: "99" | ||
leftrsasigkey: 0sAwEAAesFfVZqFzRA9F | ||
left: 192.0.2.250 | ||
leftid: 'hosta-rsa.example.org' | ||
right: 192.0.2.150 | ||
rightrsasigkey: 0sAwEAAesFfVZqFzRA9E | ||
rightid: 'hostb-rsa.example.org' | ||
ikev2: insist | ||
``` | ||
|
||
The `rightrsasigkey` and `leftrsasigkey` could be retrieved by | ||
`ipsec showhostkey --right --ckaid <CKAID>` command. | ||
|
||
### IPsec PSK authentication example | ||
|
||
```yml | ||
--- | ||
interfaces: | ||
- name: hosta_conn | ||
type: ipsec | ||
ipv4: | ||
enabled: true | ||
dhcp: true | ||
libreswan: | ||
ipsec-interface: "99" | ||
right: 192.0.2.153 | ||
rightid: 'hostb-psk.example.org' | ||
left: 192.0.2.250 | ||
leftid: 'hosta-psk.example.org' | ||
psk: "JjyNzrnHTnMqzloKaMuq2uCfJvSSUqTYdAXqD2U2OCFyVIJUUEHmXihBbPrUcmik" | ||
ikev2: insist | ||
``` | ||
|
||
The PSK method should be only used for test/develop purpose. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters