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

@@ -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`.
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/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