Update docs

This commit is contained in:
hwdsl2 2022-01-14 00:25:03 -06:00
parent 62723fe0c6
commit 598eb3e6ec
3 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto
使用 Libreswan 4.2 或更新版本,高级用户可以为 VPN 服务器启用仅限 IKEv2 模式。当启用该模式时VPN 客户端仅能使用 IKEv2 连接到 VPN 服务器。所有的 IKEv1 连接(包括 IPsec/L2TP 和 IPsec/XAuth ("Cisco IPsec") 模式)将被丢弃。 使用 Libreswan 4.2 或更新版本,高级用户可以为 VPN 服务器启用仅限 IKEv2 模式。当启用该模式时VPN 客户端仅能使用 IKEv2 连接到 VPN 服务器。所有的 IKEv1 连接(包括 IPsec/L2TP 和 IPsec/XAuth ("Cisco IPsec") 模式)将被丢弃。
要启用仅限 IKEv2 模式,首先按照[自述文件](../README-zh.md)中的说明安装 VPN 服务器并且配置 IKEv2。然后运行[辅助脚本](../extras/ikev2onlymode.sh)并按提示操作。 要启用仅限 IKEv2 模式,首先按照 [自述文件](../README-zh.md) 中的说明安装 VPN 服务器并且配置 IKEv2。然后运行 [辅助脚本](../extras/ikev2onlymode.sh) 并按提示操作。
```bash ```bash
# 下载脚本 # 下载脚本
@ -56,7 +56,7 @@ sudo bash ikev2onlymode.sh
另外,你也可以手动启用仅限 IKEv2 模式。点这里查看详情。 另外,你也可以手动启用仅限 IKEv2 模式。点这里查看详情。
</summary> </summary>
另外,你也可以手动启用仅限 IKEv2 模式。首先使用 `ipsec --version` 命令检查 Libreswan 版本,并[更新 Libreswan](../README-zh.md#升级libreswan)(如果需要)。然后编辑 VPN 服务器上的 `/etc/ipsec.conf`。在 `config setup` 小节的末尾添加 `ikev1-policy=drop`,开头必须空两格。保存文件并运行 `service ipsec restart`。在完成后,你可以使用 `ipsec status` 命令来验证仅启用了 `ikev2-cp` 连接。 另外,你也可以手动启用仅限 IKEv2 模式。首先使用 `ipsec --version` 命令检查 Libreswan 版本,并 [更新 Libreswan](../README-zh.md#升级libreswan)(如果需要)。然后编辑 VPN 服务器上的 `/etc/ipsec.conf`。在 `config setup` 小节的末尾添加 `ikev1-policy=drop`,开头必须空两格。保存文件并运行 `service ipsec restart`。在完成后,你可以使用 `ipsec status` 命令来验证仅启用了 `ikev2-cp` 连接。
</details> </details>
## VPN 内网 IP 和流量 ## VPN 内网 IP 和流量

View File

@ -114,7 +114,7 @@ To customize IKEv2 or client options, run this script without arguments.
### Windows 7, 8.x, 10 和 11 ### Windows 7, 8.x, 10 和 11
Windows 8.x10 和 11 用户可以自动导入 IKEv2 配置: Windows 8.x, 10 和 11 用户可以自动导入 IKEv2 配置:
1. 将生成的 `.p12` 文件安全地传送到你的计算机。 1. 将生成的 `.p12` 文件安全地传送到你的计算机。
1. 下载并保存 [这个辅助脚本](https://dl.ls20.com/scripts/ikev2_config_import.cmd) 到与 `.p12` 文件 **相同的文件夹** 1. 下载并保存 [这个辅助脚本](https://dl.ls20.com/scripts/ikev2_config_import.cmd) 到与 `.p12` 文件 **相同的文件夹**
@ -130,7 +130,7 @@ Windows 8.x10 和 11 用户可以自动导入 IKEv2 配置:
certutil -f -importpfx ".p12文件的位置和名称" NoExport certutil -f -importpfx ".p12文件的位置和名称" NoExport
``` ```
另外,你也可以手动导入 `.p12` 文件。详细步骤请看 [这里](https://wiki.strongswan.org/projects/strongswan/wiki/Win7Certs)。在导入证书后,你必须确保将客户端证书放在 "个人 -> 证书" 目录中,并且将 CA 证书放在 "受信任的根证书颁发机构 -> 证书" 目录中。 或者,你也可以手动导入 `.p12` 文件。详细步骤请看 [这里](https://wiki.strongswan.org/projects/strongswan/wiki/Win7Certs)。在导入证书后,你必须确保将客户端证书放在 "个人 -> 证书" 目录中,并且将 CA 证书放在 "受信任的根证书颁发机构 -> 证书" 目录中。
1. 在 Windows 计算机上添加一个新的 IKEv2 VPN 连接。对于 Windows 8.x, 10 和 11推荐从命令提示符运行以下命令创建 VPN 连接以达到更佳的安全性和性能。Windows 7 不支持这些命令,你可以手动创建 VPN 连接(见下面)。 1. 在 Windows 计算机上添加一个新的 IKEv2 VPN 连接。对于 Windows 8.x, 10 和 11推荐从命令提示符运行以下命令创建 VPN 连接以达到更佳的安全性和性能。Windows 7 不支持这些命令,你可以手动创建 VPN 连接(见下面)。
@ -141,7 +141,7 @@ Windows 8.x10 和 11 用户可以自动导入 IKEv2 配置:
powershell -command "Set-VpnConnectionIPsecConfiguration -ConnectionName 'My IKEv2 VPN' -AuthenticationTransformConstants GCMAES128 -CipherTransformConstants GCMAES128 -EncryptionMethod AES256 -IntegrityCheckMethod SHA256 -PfsGroup None -DHGroup Group14 -PassThru -Force" powershell -command "Set-VpnConnectionIPsecConfiguration -ConnectionName 'My IKEv2 VPN' -AuthenticationTransformConstants GCMAES128 -CipherTransformConstants GCMAES128 -EncryptionMethod AES256 -IntegrityCheckMethod SHA256 -PfsGroup None -DHGroup Group14 -PassThru -Force"
``` ```
另外,你也可以手动创建 VPN 连接。详细步骤请看 [这里](https://wiki.strongswan.org/projects/strongswan/wiki/Win7Config)。如果你在配置 IKEv2 时指定了服务器的域名(而不是 IP 地址),则必须在 **Internet地址** 字段中输入该域名。 或者,你也可以手动创建 VPN 连接。详细步骤请看 [这里](https://wiki.strongswan.org/projects/strongswan/wiki/Win7Config)。如果你在配置 IKEv2 时指定了服务器的域名(而不是 IP 地址),则必须在 **Internet地址** 字段中输入该域名。
1. **此步骤为必须,如果你手动创建了 VPN 连接**)为 IKEv2 启用更强的加密算法,通过修改一次注册表来实现。请下载并导入下面的 `.reg` 文件,或者打开提升权限命令提示符并运行以下命令。更多信息请看 [这里](https://wiki.strongswan.org/projects/strongswan/wiki/WindowsClients#AES-256-CBC-and-MODP2048)。 1. **此步骤为必须,如果你手动创建了 VPN 连接**)为 IKEv2 启用更强的加密算法,通过修改一次注册表来实现。请下载并导入下面的 `.reg` 文件,或者打开提升权限命令提示符并运行以下命令。更多信息请看 [这里](https://wiki.strongswan.org/projects/strongswan/wiki/WindowsClients#AES-256-CBC-and-MODP2048)。

View File

@ -118,7 +118,7 @@ Windows 8.x, 10 and 11 users can automatically import IKEv2 configuration:
1. Securely transfer the generated `.p12` file to your computer. 1. Securely transfer the generated `.p12` file to your computer.
1. Download and save [this helper script](https://dl.ls20.com/scripts/ikev2_config_import.cmd) to the **same folder** as the `.p12` file. 1. Download and save [this helper script](https://dl.ls20.com/scripts/ikev2_config_import.cmd) to the **same folder** as the `.p12` file.
1. Right-click on the saved script, select **Properties**. Click on **Unblock** [at the bottom](https://www.thewindowsclub.com/microsoft-defender-smartscreen-prevented-an-unrecognized-app-from-starting), then click on **OK**. 1. Right-click on the saved script, select **Properties**. Click on **Unblock** at the bottom, then click on **OK**.
1. Right-click on the saved script, select **Run as administrator** and follow the prompts. 1. Right-click on the saved script, select **Run as administrator** and follow the prompts.
Alternatively, you may manually import IKEv2 configuration. These steps apply to Windows 7, 8.x, 10 and 11. Alternatively, you may manually import IKEv2 configuration. These steps apply to Windows 7, 8.x, 10 and 11.