From 55b468bb1f29501bbf4500cca4cc6cf5c2118fbd Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Mon, 24 May 2021 01:20:32 -0500 Subject: [PATCH] Update docs --- README-zh.md | 16 ++++++++-------- README.md | 16 ++++++++-------- docs/ikev2-howto-zh.md | 17 ++++++++++------- docs/ikev2-howto.md | 17 ++++++++++------- 4 files changed, 36 insertions(+), 30 deletions(-) diff --git a/README-zh.md b/README-zh.md index 7b97372..4728b2b 100644 --- a/README-zh.md +++ b/README-zh.md @@ -39,7 +39,7 @@ Ubuntu & Debian ```bash -wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto +wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto ``` @@ -49,7 +49,7 @@ CentOS & RHEL ```bash -wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto +wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto ``` @@ -59,7 +59,7 @@ Amazon Linux 2 ```bash -wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto +wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto ``` @@ -151,7 +151,7 @@ wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh 在安装成功之后,推荐 配置 IKEv2: ```bash -sudo bash /opt/src/ikev2.sh --auto +sudo ikev2.sh --auto ``` **选项 2:** 编辑脚本并提供你自己的 VPN 登录凭证: @@ -201,7 +201,7 @@ sudo sh vpn.sh 在安装成功之后,推荐 配置 IKEv2: ```bash -sudo bash /opt/src/ikev2.sh --auto +sudo ikev2.sh --auto ``` **选项 3:** 将你自己的 VPN 登录凭证定义为环境变量: @@ -258,7 +258,7 @@ sh vpn.sh 在安装成功之后,推荐 配置 IKEv2: ```bash -sudo bash /opt/src/ikev2.sh --auto +sudo ikev2.sh --auto ``` **注:** 如果无法通过 `wget` 下载,你也可以打开 vpnsetup.shvpnsetup_centos.sh 或者 vpnsetup_amzn.sh,然后点击右方的 **`Raw`** 按钮。按快捷键 `Ctrl-A` 全选, `Ctrl-C` 复制,然后粘贴到你喜欢的编辑器。 @@ -350,7 +350,7 @@ wget https://git.io/vpnupgrade-amzn -O vpnup.sh && sudo sh vpnup.sh ``` sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 sh vpn.sh -sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto +sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 ikev2.sh --auto ``` ### 域名和更改服务器 IP @@ -360,7 +360,7 @@ sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto 对于 IKEv2 模式,如果你想要 VPN 在服务器的 IP 更改后继续正常工作,则必须在 配置 IKEv2 时指定一个域名作为 VPN 服务器的地址。该域名必须是一个全称域名(FQDN)。示例如下: ``` -sudo VPN_DNS_NAME='vpn.example.com' bash /opt/src/ikev2.sh --auto +sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto ``` 另外,你也可以自定义 IKEv2 安装选项,通过在运行 辅助脚本 时去掉 `--auto` 参数来实现。 diff --git a/README.md b/README.md index aba8b6f..bd66440 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Ubuntu & Debian ```bash -wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto +wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto ``` @@ -49,7 +49,7 @@ CentOS & RHEL ```bash -wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto +wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto ``` @@ -59,7 +59,7 @@ Amazon Linux 2 ```bash -wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto +wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto ``` @@ -151,7 +151,7 @@ wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh After successful installation, it is recommended to set up IKEv2: ```bash -sudo bash /opt/src/ikev2.sh --auto +sudo ikev2.sh --auto ``` **Option 2:** Edit the script and provide your own VPN credentials: @@ -201,7 +201,7 @@ sudo sh vpn.sh After successful installation, it is recommended to set up IKEv2: ```bash -sudo bash /opt/src/ikev2.sh --auto +sudo ikev2.sh --auto ``` **Option 3:** Define your VPN credentials as environment variables: @@ -258,7 +258,7 @@ sh vpn.sh After successful installation, it is recommended to set up IKEv2: ```bash -sudo bash /opt/src/ikev2.sh --auto +sudo ikev2.sh --auto ``` **Note:** If unable to download via `wget`, you may also open vpnsetup.sh, vpnsetup_centos.sh or vpnsetup_amzn.sh, and click the **`Raw`** button on the right. Press `Ctrl-A` to select all, `Ctrl-C` to copy, then paste into your favorite editor. @@ -350,7 +350,7 @@ Advanced users can define `VPN_DNS_SRV1` and optionally `VPN_DNS_SRV2` when runn ``` sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 sh vpn.sh -sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto +sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 ikev2.sh --auto ``` ### DNS name and server IP changes @@ -360,7 +360,7 @@ For IPsec/L2TP and IKEv2 mode, if you want the VPN to continue to work after server IP changes, you must specify a DNS name to be used as the VPN server's address when setting up IKEv2. The DNS name must be a fully qualified domain name (FQDN). Example: ``` -sudo VPN_DNS_NAME='vpn.example.com' bash /opt/src/ikev2.sh --auto +sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto ``` Alternatively, you may customize IKEv2 setup options by running the helper script without the `--auto` parameter. diff --git a/docs/ikev2-howto-zh.md b/docs/ikev2-howto-zh.md index fffa09a..31763b4 100644 --- a/docs/ikev2-howto-zh.md +++ b/docs/ikev2-howto-zh.md @@ -34,21 +34,24 @@ Libreswan 支持通过使用 RSA 签名算法的 X.509 Machine Certificates 来 使用这个辅助脚本来自动地在 VPN 服务器上配置 IKEv2: ``` -sudo bash /opt/src/ikev2.sh --auto +sudo ikev2.sh --auto ``` -该 脚本 必须使用 `bash` 而不是 `sh` 运行。以上命令使用自动模式和默认选项运行辅助脚本。如果你想要自定义 IKEv2 安装选项,请在运行脚本时去掉 `--auto` 参数。在完成之后,请转到 [配置 IKEv2 VPN 客户端](#配置-ikev2-vpn-客户端)。 +以上命令使用自动模式和默认选项运行 辅助脚本。如果你想要自定义 IKEv2 安装选项,请在运行脚本时去掉 `--auto` 参数。在完成之后,请转到 [配置 IKEv2 VPN 客户端](#配置-ikev2-vpn-客户端)。
-错误:"bash: /opt/src/ikev2.sh: No such file or directory". +错误:"sudo: ikev2.sh: command not found". 如果你使用了较早版本的 VPN 安装脚本,这是正常的。请下载并运行 IKEv2 辅助脚本: ``` -wget https://git.io/ikev2setup -O /opt/src/ikev2.sh && sudo bash /opt/src/ikev2.sh --auto +wget https://git.io/ikev2setup -O ~/ikev2.sh +sudo bash ~/ikev2.sh --auto ``` + +**注:** 该辅助脚本必须使用 `bash` 而不是 `sh` 运行。
@@ -58,19 +61,19 @@ wget https://git.io/ikev2setup -O /opt/src/ikev2.sh && sudo bash /opt/src/ikev2. 在使用自动模式安装 IKEv2 时,高级用户可以指定一个域名作为 VPN 服务器的地址。这是可选的。该域名必须是一个全称域名(FQDN)。示例如下: ``` -sudo VPN_DNS_NAME='vpn.example.com' bash /opt/src/ikev2.sh --auto +sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto ``` 类似地,你可以指定第一个 IKEv2 客户端的名称。这是可选的。如果未指定,则使用默认值 `vpnclient`。 ``` -sudo VPN_CLIENT_NAME='your_client_name' bash /opt/src/ikev2.sh --auto +sudo VPN_CLIENT_NAME='your_client_name' ikev2.sh --auto ``` 在 VPN 已连接时,IKEv2 客户端默认配置为使用 Google Public DNS。在使用自动模式安装 IKEv2 时,你可以指定另外的 DNS 服务器。这是可选的。示例如下: ``` -sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto +sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 ikev2.sh --auto ```
diff --git a/docs/ikev2-howto.md b/docs/ikev2-howto.md index 6c59122..e5690b5 100644 --- a/docs/ikev2-howto.md +++ b/docs/ikev2-howto.md @@ -34,21 +34,24 @@ After following this guide, you will be able to connect to the VPN using IKEv2 i Use this helper script to automatically set up IKEv2 on the VPN server: ``` -sudo bash /opt/src/ikev2.sh --auto +sudo ikev2.sh --auto ``` -The script must be run using `bash`, not `sh`. The command above runs the helper script in auto mode, using default options. Remove the `--auto` parameter if you want to customize IKEv2 setup options. When finished, continue to [configure IKEv2 VPN clients](#configure-ikev2-vpn-clients). +The command above runs the helper script in auto mode, using default options. Remove the `--auto` parameter if you want to customize IKEv2 setup options. When finished, continue to [configure IKEv2 VPN clients](#configure-ikev2-vpn-clients).
-Error: "bash: /opt/src/ikev2.sh: No such file or directory". +Error: "sudo: ikev2.sh: command not found". This is normal if you used an older version of the VPN setup script. Please download and run the IKEv2 helper script: ``` -wget https://git.io/ikev2setup -O /opt/src/ikev2.sh && sudo bash /opt/src/ikev2.sh --auto +wget https://git.io/ikev2setup -O ~/ikev2.sh +sudo bash ~/ikev2.sh --auto ``` + +**Note:** The helper script must be run using `bash`, not `sh`.
@@ -58,19 +61,19 @@ You may optionally specify a DNS name, client name and/or custom DNS servers. Cl When running IKEv2 setup in auto mode, advanced users can optionally specify a DNS name to be used as the VPN server's address. The DNS name must be a fully qualified domain name (FQDN). Example: ``` -sudo VPN_DNS_NAME='vpn.example.com' bash /opt/src/ikev2.sh --auto +sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto ``` Similarly, you may optionally specify a name for the first IKEv2 client. The default is `vpnclient` if not specified. ``` -sudo VPN_CLIENT_NAME='your_client_name' bash /opt/src/ikev2.sh --auto +sudo VPN_CLIENT_NAME='your_client_name' ikev2.sh --auto ``` By default, IKEv2 clients are set to use Google Public DNS when the VPN is active. When running IKEv2 setup in auto mode, you may optionally specify custom DNS server(s). Example: ``` -sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto +sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 ikev2.sh --auto ```