1
0
mirror of synced 2024-11-22 13:06:02 +03:00

Update docs

- Add instructions for Ubuntu IPsec/L2TP VPN clients
- Cleanup
This commit is contained in:
hwdsl2 2018-12-10 00:33:46 -06:00
parent 9756ef92fa
commit b0a7cb3eaa
2 changed files with 22 additions and 10 deletions

View File

@ -49,6 +49,8 @@
1. 单击 **确定** 关闭 **高级设置**
1. 单击 **确定** 保存 VPN 连接的详细信息。
**注:** 在首次连接之前需要**修改一次注册表**。请参见下面的说明。
另外,除了按照以上步骤操作,你也可以运行下面的 Windows PowerShell 命令来创建 VPN 连接。将 `你的 VPN 服务器 IP``你的 VPN IPsec PSK` 换成你自己的值,用单引号括起来:
```console
@ -58,8 +60,6 @@ Set-PSReadlineOption HistorySaveStyle SaveNothing
Add-VpnConnection -Name 'My IPsec VPN' -ServerAddress '你的 VPN 服务器 IP' -TunnelType L2tp -EncryptionLevel Required -AuthenticationMethod Chap,MSChapv2 -L2tpPsk '你的 VPN IPsec PSK' -Force -RememberCredential -PassThru
```
**注:** 在首次连接之前需要修改一次注册表。请参见下面的说明。
### Windows 7, Vista and XP
1. 单击开始菜单,选择控制面板。
@ -181,11 +181,17 @@ VPN 连接成功后,网络状态图标上会出现 VPN 指示。最后你可
## Windows Phone
Windows Phone 8.1 及以上版本用户可以尝试按照 <a href="http://forums.windowscentral.com/windows-phone-8-1-preview-developers/301521-tutorials-windows-phone-8-1-support-l2tp-ipsec-vpn-now.html" target="_blank">这个教程</a> 的步骤操作。最后你可以到 <a href="https://www.ipchicken.com" target="_blank">这里</a> 检测你的 IP 地址,应该显示为`你的 VPN 服务器 IP`。
Windows Phone 8.1 及以上版本用户可以尝试按照 <a href="http://forums.windowscentral.com/windows-phone-8-1-preview-developers/301521-tutorials-windows-phone-8-1-support-l2tp-ipsec-vpn-now.html" target="_blank">这个教程</a> 的步骤操作。
## Linux
请参见 [Linux VPN 客户端](#linux-vpn-客户端)。
### Ubuntu Linux
Ubuntu 18.04 (和更新版本)用户可以安装 <a href="https://packages.ubuntu.com/search?keywords=network-manager-l2tp-gnome" target="_blank">network-manager-l2tp-gnome</a> 软件包,然后通过 GUI 配置 IPsec/L2TP VPN 客户端 (设置 -> 网络 -> VPN。Ubuntu 16.04 和 14.04 用户可能需要添加 `nm-l2tp` PPA。更多信息请看<a href="https://medium.com/@hkdb/ubuntu-16-04-connecting-to-l2tp-over-ipsec-via-network-manager-204b5d475721" target="_blank">这里</a>。其它 Ubuntu 版本可以尝试使用下面的命令行配置方法。
### 其它 Linux
首先看<a href="https://github.com/nm-l2tp/network-manager-l2tp/wiki/Prebuilt-Packages" target="_blank">这里</a>以确认 `network-manager-l2tp` 软件包是否在你的 Linux 版本上可用。另外,你也可以 [使用命令行配置 Linux VPN 客户端](#使用命令行配置-linux-vpn-客户端)。
## 故障排除
@ -326,7 +332,7 @@ ipsec verify
ipsec whack --trafficstatus
```
## Linux VPN 客户端
## 使用命令行配置 Linux VPN 客户端
以下步骤是基于 [Peter Sanford 的工作](https://gist.github.com/psanford/42c550a1a6ad3cb70b13e4aaa94ddb1c)。这些命令必须在你的 VPN 客户端上使用 `root` 账户运行。

View File

@ -49,6 +49,8 @@ After <a href="https://github.com/hwdsl2/setup-ipsec-vpn" target="_blank">settin
1. Click **OK** to close the **Advanced settings**.
1. Click **OK** to save the VPN connection details.
**Note:** A **one-time registry change** is required before connecting. See details below.
Alternatively, instead of following the steps above, you may create the VPN connection using these Windows PowerShell commands. Replace `Your VPN Server IP` and `Your VPN IPsec PSK` with your own values, enclosed in single quotes:
```console
@ -58,8 +60,6 @@ Set-PSReadlineOption HistorySaveStyle SaveNothing
Add-VpnConnection -Name 'My IPsec VPN' -ServerAddress 'Your VPN Server IP' -TunnelType L2tp -EncryptionLevel Required -AuthenticationMethod Chap,MSChapv2 -L2tpPsk 'Your VPN IPsec PSK' -Force -RememberCredential -PassThru
```
**Note:** A one-time registry change is required before connecting. See details below.
### Windows 7, Vista and XP
1. Click on the Start Menu and go to the Control Panel.
@ -181,11 +181,17 @@ If you get an error when trying to connect, see <a href="#troubleshooting">Troub
## Windows Phone
Users with Windows Phone 8.1 and above, try <a href="http://forums.windowscentral.com/windows-phone-8-1-preview-developers/301521-tutorials-windows-phone-8-1-support-l2tp-ipsec-vpn-now.html" target="_blank">this tutorial</a>. You can verify that your traffic is being routed properly by <a href="https://www.google.com/search?q=my+ip" target="_blank">looking up your IP address on Google</a>. It should say "Your public IP address is `Your VPN Server IP`".
Users with Windows Phone 8.1 and above, try <a href="http://forums.windowscentral.com/windows-phone-8-1-preview-developers/301521-tutorials-windows-phone-8-1-support-l2tp-ipsec-vpn-now.html" target="_blank">this tutorial</a>.
## Linux
See [Linux VPN Clients](#linux-vpn-clients).
### Ubuntu Linux
Ubuntu 18.04 (and newer) users can install the <a href="https://packages.ubuntu.com/search?keywords=network-manager-l2tp-gnome" target="_blank">network-manager-l2tp-gnome</a> package, then configure the IPsec/L2TP VPN client using the GUI (Settings -> Network -> VPN). Ubuntu 16.04 and 14.04 users may need to add the `nm-l2tp` PPA. Read more <a href="https://medium.com/@hkdb/ubuntu-16-04-connecting-to-l2tp-over-ipsec-via-network-manager-204b5d475721" target="_blank">here</a>. For other Ubuntu versions, try the command line method below.
### Other Linux
First check <a href="https://github.com/nm-l2tp/network-manager-l2tp/wiki/Prebuilt-Packages" target="_blank">here</a> to see if the `network-manager-l2tp` package is available for your Linux distribution. Alternatively, you may [configure Linux VPN clients using the command line](#configure-linux-vpn-clients-using-the-command-line).
## Troubleshooting
@ -326,7 +332,7 @@ Show current established VPN connections:
ipsec whack --trafficstatus
```
## Linux VPN Clients
## Configure Linux VPN clients using the command line
Instructions below are based on [the work of Peter Sanford](https://gist.github.com/psanford/42c550a1a6ad3cb70b13e4aaa94ddb1c). Commands must be run as `root` on your VPN client.