From ddaa0ee99c4c2c6fe4650c4d9394fc7d5186f7d5 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Mon, 17 Dec 2018 00:07:04 -0600 Subject: [PATCH] Improve DNS servers - Improve modecfgdns format - Better parsing of DNS servers in upgrade scripts - Add usage of DNS server variables to README and allow users to specify only one or both alternative DNS servers --- README-zh.md | 2 +- README.md | 2 +- docs/ikev2-howto-zh.md | 2 +- docs/ikev2-howto.md | 2 +- extras/vpnupgrade.sh | 19 ++++++++++--------- extras/vpnupgrade_centos.sh | 19 ++++++++++--------- vpnsetup.sh | 13 ++++++++++--- vpnsetup_centos.sh | 13 ++++++++++--- 8 files changed, 44 insertions(+), 28 deletions(-) diff --git a/README-zh.md b/README-zh.md index 1034672..18bfe18 100644 --- a/README-zh.md +++ b/README-zh.md @@ -151,7 +151,7 @@ sh vpnsetup.sh 如果需要添加,修改或者删除 VPN 用户账户,请参见 管理 VPN 用户。该文档包含辅助脚本,以方便管理 VPN 用户。 -在 VPN 已连接时,客户端配置为使用 Google Public DNS。如果偏好其它的域名解析服务,请编辑 `/etc/ppp/options.xl2tpd` 和 `/etc/ipsec.conf` 并替换 `8.8.8.8` 和 `8.8.4.4`。然后重启服务器。 +在 VPN 已连接时,客户端配置为使用 Google Public DNS。如果偏好其它的域名解析服务,编辑 `/etc/ppp/options.xl2tpd` 和 `/etc/ipsec.conf` 并替换 `8.8.8.8` 和 `8.8.4.4`,然后重启服务器。或者,你也可以在运行 VPN 脚本时定义变量 `VPN_DNS_SRV1` 和 `VPN_DNS_SRV2`(可选)。 使用内核支持有助于提高 IPsec/L2TP 性能。它在以下系统上可用: Ubuntu 18.04/16.04, Debian 9 和 CentOS 7/6. Ubuntu 系统需要安装 `linux-modules-extra-$(uname -r)`(或者 `linux-image-extra`),然后运行 `service xl2tpd restart`。 diff --git a/README.md b/README.md index ef7713a..b545ab1 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ For servers with an external firewall (e.g. Manage VPN Users. Helper scripts are included for convenience. -Clients are set to use Google Public DNS when the VPN is active. If another DNS provider is preferred, replace `8.8.8.8` and `8.8.4.4` in both `/etc/ppp/options.xl2tpd` and `/etc/ipsec.conf`. Then reboot your server. +Clients are set to use Google Public DNS when the VPN is active. If another DNS provider is preferred, replace `8.8.8.8` and `8.8.4.4` in both `/etc/ppp/options.xl2tpd` and `/etc/ipsec.conf`, then reboot your server. Alternatively, you may define `VPN_DNS_SRV1` and optionally `VPN_DNS_SRV2` when running the VPN setup script. Using kernel support could improve IPsec/L2TP performance. It is available on Ubuntu 18.04/16.04, Debian 9 and CentOS 7/6. Ubuntu users: Install `linux-modules-extra-$(uname -r)` (or `linux-image-extra`), then run `service xl2tpd restart`. diff --git a/docs/ikev2-howto-zh.md b/docs/ikev2-howto-zh.md index 4862252..72d1535 100644 --- a/docs/ikev2-howto-zh.md +++ b/docs/ikev2-howto-zh.md @@ -74,7 +74,7 @@ Libreswan 支持通过使用 RSA 签名算法的 X.509 Machine Certificates 来 ```bash cat >> /etc/ipsec.conf < /etc/ppp/options.xl2tpd <> /etc/ppp/options.xl2tpd < /etc/ppp/chap-secrets < /etc/ppp/options.xl2tpd <> /etc/ppp/options.xl2tpd < /etc/ppp/chap-secrets <