1
0
mirror of synced 2024-11-22 04:56:03 +03:00

Improve docs

- Add translation for uninstall.md
- Various corrections to docs
- [ci skip]
This commit is contained in:
hwdsl2 2016-06-24 17:54:24 -05:00
parent c4b6b47797
commit 681f10cd70
6 changed files with 114 additions and 21 deletions

View File

@ -19,6 +19,7 @@
- [重要提示](#重要提示)
- [关于升级Libreswan](#关于升级libreswan)
- [问题和反馈](#问题和反馈)
- [如何卸载](#如何卸载)
- [另见](#另见)
- [作者](#作者)
- [授权协议](#授权协议)
@ -112,9 +113,13 @@ sudo sh vpnsetup.sh
- Libreswan (IPsec) 的相关问题可在<a href="https://lists.libreswan.org/mailman/listinfo/swan" target="_blank">邮件列表</a>提问。也可以参见这些文章:<a href="https://libreswan.org/wiki/Main_Page" target="_blank">[1]</a> <a href="https://wiki.gentoo.org/wiki/IPsec_L2TP_VPN_server" target="_blank">[2]</a> <a href="https://wiki.archlinux.org/index.php/L2TP/IPsec_VPN_client_setup" target="_blank">[3]</a> <a href="https://help.ubuntu.com/community/L2TPServer" target="_blank">[4]</a> <a href="https://libreswan.org/man/ipsec.conf.5.html" target="_blank">[5]</a>
- 如果你发现了一个可重复的程序漏洞,请提交一个 <a href="https://github.com/hwdsl2/setup-ipsec-vpn/issues?q=is%3Aissue" target="_blank">GitHub Issue</a>
## 如何卸载
请参见 [卸载 VPN](docs/uninstall-zh.md)。
## 另见
- [IPsec VPN Server on Docker](https://github.com/hwdsl2/docker-ipsec-vpn-server)
- [在 Docker 上搭建 IPsec VPN](https://github.com/hwdsl2/docker-ipsec-vpn-server)
## 作者

View File

@ -19,6 +19,7 @@ We will use <a href="https://libreswan.org/" target="_blank">Libreswan</a> as th
- [Important Notes](#important-notes)
- [Upgrading Libreswan](#upgrading-libreswan)
- [Bugs & Questions](#bugs--questions)
- [How to Uninstall](#how-to-uninstall)
- [See Also](#see-also)
- [Author](#author)
- [License](#license)
@ -112,10 +113,13 @@ The additional scripts <a href="extras/vpnupgrade_Libreswan.sh" target="_blank">
- Ask Libreswan (IPsec) related questions <a href="https://lists.libreswan.org/mailman/listinfo/swan" target="_blank">on the mailing list</a>, or read these articles: <a href="https://libreswan.org/wiki/Main_Page" target="_blank">[1]</a> <a href="https://wiki.gentoo.org/wiki/IPsec_L2TP_VPN_server" target="_blank">[2]</a> <a href="https://wiki.archlinux.org/index.php/L2TP/IPsec_VPN_client_setup" target="_blank">[3]</a> <a href="https://help.ubuntu.com/community/L2TPServer" target="_blank">[4]</a> <a href="https://libreswan.org/man/ipsec.conf.5.html" target="_blank">[5]</a>.
- If you found a reproducible bug, open a <a href="https://github.com/hwdsl2/setup-ipsec-vpn/issues?q=is%3Aissue" target="_blank">GitHub Issue</a> to submit a bug report.
## How to Uninstall
Please refer to [Uninstall the VPN](docs/uninstall.md).
## See Also
- [IPsec VPN Server on Docker](https://github.com/hwdsl2/docker-ipsec-vpn-server)
- [For uninstallation see this](/docs/uninstall.md)
## Author

View File

@ -1,6 +1,6 @@
## 配置 IPsec/XAuth VPN 客户端
*Read this in other languages: [English](clients-xauth.md), [简体中文](clients-xauth-zh.md).*
*其他语言版本: [English](clients-xauth.md), [简体中文](clients-xauth-zh.md).*
*如需使用 IPsec/L2TP 模式连接,请参见: [配置 IPsec/L2TP VPN 客户端](clients-zh.md)*

View File

@ -1,6 +1,6 @@
## 配置 IPsec/L2TP VPN 客户端
*Read this in other languages: [English](clients.md), [简体中文](clients-zh.md).*
*其他语言版本: [English](clients.md), [简体中文](clients-zh.md).*
*如需使用 IPsec/XAuth 模式连接,请参见: [配置 IPsec/XAuth VPN 客户端](clients-xauth-zh.md)*

77
docs/uninstall-zh.md Normal file
View File

@ -0,0 +1,77 @@
# 卸载 VPN
*其他语言版本: [English](uninstall.md), [简体中文](uninstall-zh.md).*
按照以下步骤移除 VPN。这些命令需要用 `root` 账户运行,或者使用 `sudo`
## 步骤
* [第一步](#第一步)
* [第二步](#第二步)
* [第三步](#第三步)
* [第四步](#第四步)
* [可选步骤](#可选步骤)
* [完成后操作](#完成后操作)
## 第一步
```
service ipsec stop
service xl2tpd stop
rm -rf /usr/local/sbin/ipsec /usr/local/libexec/ipsec
rm -f /etc/init.d/ipsec /lib/systemd/system/ipsec.service
```
## 第二步
### Ubuntu/Debian
`apt-get remove xl2tpd`
### CentOS/RHEL
`yum remove xl2tpd`
## 第三步
### Ubuntu/Debian
编辑 `/etc/iptables.rules` 并删除不需要的规则。
你以前的防火墙规则(如果有)会备份在 `/etc/iptables.rules.old-date-time`
另外如果文件 `/etc/iptables/rules.v4` 存在,请编辑它。
如果使用 IPv6 ,还需编辑 `/etc/ip6tables.rules` 和/或 `/etc/iptables/rules.v6`
### CentOS/RHEL
编辑 `/etc/sysconfig/iptables` 并删除不需要的规则。
如果使用 IPv6 ,还需编辑 `/etc/sysconfig/ip6tables`
## 第四步
编辑 `/etc/sysctl.conf` 并删除该标记后面的行: `# Added by hwdsl2 VPN script`
编辑 `/etc/rc.local` 并删除该标记后面的行: `# Added by hwdsl2 VPN script`。*不要删除 `exit 0` (如果有)*。
## 可选步骤
删除这些配置文件:
* /etc/ipsec.conf
* /etc/ipsec.secrets
* /etc/xl2tpd/xl2tpd.conf
* /etc/ppp/options.xl2tpd
* /etc/ppp/chap-secrets
* /etc/ipsec.d/*
* /etc/pam.d/pluto
* /etc/sysconfig/pluto
要快速删除,可以复制并粘贴以下命令:
`rm -f /etc/ipsec.conf /etc/ipsec.secrets /etc/xl2tpd/xl2tpd.conf /etc/ppp/options.xl2tpd /etc/ppp/chap-secrets /etc/ipsec.d/* /etc/pam.d/pluto /etc/sysconfig/pluto`
删除 Libreswan 源目录:
`rm -rf /opt/src/libreswan-*`
## 完成后操作
重启你的服务器。

View File

@ -1,6 +1,8 @@
# Uninstall IPsec/L2TP VPN
# Uninstall the VPN
To remove the VPN:
*Read this in other languages: [English](uninstall.md), [简体中文](uninstall-zh.md).*
Follow these steps to remove the VPN. Commands must be run as `root`, or with `sudo`.
## Steps
@ -12,46 +14,47 @@ To remove the VPN:
* [When finished](#when-finished)
## First step
```
service ipsec stop
service xl2tpd stop
rm -rf /usr/local/sbin/ipsec /usr/local/libexec/ipsec
rm -f /etc/init.d/ipsec /lib/systemd/system/ipsec.service
rm -rf /opt/src/libreswan-*
```
## Second step
### For Ubuntu/Debian:
### Ubuntu/Debian
`apt-get remove xl2tpd`
### For CentOS/RHEL:
### CentOS/RHEL
`yum remove xl2tpd`
## Third step
### For Ubuntu/Debian:
### Ubuntu/Debian
Edit `/etc/iptables.rules` and remove unneeded rules.
Your original rules (if any) are backed up as `/etc/iptables.rules.old-date-time`.
In addition, edit `/etc/iptables/rules.v4` if the file exists.
If using IPv6, also edit `/etc/ip6tables.rules` and `/etc/iptables/rules.v6`.
If using IPv6, also edit `/etc/ip6tables.rules` and/or `/etc/iptables/rules.v6`.
### For CentOS/RHEL:
### CentOS/RHEL
Edit `/etc/sysconfig/iptables` and `/etc/sysconfig/ip6tables`
Edit `/etc/sysconfig/iptables` and remove unneeded rules.
If using IPv6, also edit `/etc/sysconfig/ip6tables`.
## Fourth step
Edit `/etc/sysctl.conf` and remove the lines after `# Added by hwdsl2 VPN script`
Edit `/etc/rc.local` and remove the lines after `# Added by hwdsl2 VPN script`, *except exit 0 (if any)*
Edit `/etc/sysctl.conf` and remove the lines after `# Added by hwdsl2 VPN script`.
Edit `/etc/rc.local` and remove the lines after `# Added by hwdsl2 VPN script`, *except exit 0 (if any)*.
## Optional
Remove these config files:
* /etc/ipsec.conf
* /etc/ipsec.secrets
* /etc/xl2tpd/xl2tpd.conf
@ -61,9 +64,13 @@ Remove these config files:
* /etc/pam.d/pluto
* /etc/sysconfig/pluto
copy && paste for fast remove:
Copy and paste for fast removal:
`sudo rm -f /etc/ipsec.conf /etc/ipsec.secrets /etc/xl2tpd/xl2tpd.conf /etc/ppp/options.xl2tpd /etc/ppp/chap-secrets /etc/ipsec.d/* /etc/pam.d/pluto /etc/sysconfig/pluto`
`rm -f /etc/ipsec.conf /etc/ipsec.secrets /etc/xl2tpd/xl2tpd.conf /etc/ppp/options.xl2tpd /etc/ppp/chap-secrets /etc/ipsec.d/* /etc/pam.d/pluto /etc/sysconfig/pluto`
Remove Libreswan source directory:
`rm -rf /opt/src/libreswan-*`
## When finished