Update docs

[ci skip]
This commit is contained in:
hwdsl2 2017-01-16 17:27:08 -06:00
parent 2dbdee1287
commit 3735530015
2 changed files with 20 additions and 2 deletions

View File

@ -58,12 +58,21 @@ Libreswan 支持通过使用 RSA 签名算法的 X.509 Machine Certificates 来
ikev2=insist ikev2=insist
rekey=no rekey=no
fragmentation=yes fragmentation=yes
forceencaps=yes
ike=3des-sha1,aes-sha1,aes256-sha2_512,aes256-sha2_256 ike=3des-sha1,aes-sha1,aes256-sha2_512,aes256-sha2_256
phase2alg=3des-sha1,aes-sha1,aes256-sha2_512,aes256-sha2_256 phase2alg=3des-sha1,aes-sha1,aes256-sha2_512,aes256-sha2_256
EOF EOF
``` ```
还需要在该文件中添加一行,根据 Libreswan 的版本而不同。请运行以下命令:
```bash
$ if /usr/local/sbin/ipsec --version | grep -qs -F "3.19"; then
echo " encapsulation=yes" >> /etc/ipsec.conf
else
echo " forceencaps=yes" >> /etc/ipsec.conf
fi
```
1. 生成 Certificate Authority (CA) 和 VPN 服务器证书: 1. 生成 Certificate Authority (CA) 和 VPN 服务器证书:
注: 使用 "-v" 参数指定证书的有效期(单位:月),例如 "-v 36"。 注: 使用 "-v" 参数指定证书的有效期(单位:月),例如 "-v 36"。

View File

@ -58,12 +58,21 @@ Before continuing, make sure you have successfully <a href="https://github.com/h
ikev2=insist ikev2=insist
rekey=no rekey=no
fragmentation=yes fragmentation=yes
forceencaps=yes
ike=3des-sha1,aes-sha1,aes256-sha2_512,aes256-sha2_256 ike=3des-sha1,aes-sha1,aes256-sha2_512,aes256-sha2_256
phase2alg=3des-sha1,aes-sha1,aes256-sha2_512,aes256-sha2_256 phase2alg=3des-sha1,aes-sha1,aes256-sha2_512,aes256-sha2_256
EOF EOF
``` ```
We need to add one more line to that file, based on your Libreswan version. Please run command:
```bash
$ if /usr/local/sbin/ipsec --version | grep -qs -F "3.19"; then
echo " encapsulation=yes" >> /etc/ipsec.conf
else
echo " forceencaps=yes" >> /etc/ipsec.conf
fi
```
1. Generate Certificate Authority (CA) and VPN server certificates: 1. Generate Certificate Authority (CA) and VPN server certificates:
Note: Specify the certificate validity period (in months) using "-v". e.g. "-v 36". Note: Specify the certificate validity period (in months) using "-v". e.g. "-v 36".