Improve VPN IPs

- Use %defaultroute and iptables MASQUERADE, no need to detect private IP
- Use %any for the first field of ipsec.secrets, instead of public IP
- As a result, the VPN server should now better adapt to IP changes.
This commit is contained in:
hwdsl2
2017-02-10 18:00:29 -06:00
parent f7961242e4
commit 03007079e6
8 changed files with 30 additions and 52 deletions

View File

@@ -7,7 +7,7 @@ By default, a single user account for VPN login is created. If you wish to add,
First, the IPsec PSK (pre-shared key) is stored in `/etc/ipsec.secrets`. To change to a new PSK, just edit this file.
```bash
<VPN Server IP> %any : PSK "<VPN IPsec PSK>"
%any %any : PSK "<VPN IPsec PSK>"
```
For `IPsec/L2TP`, VPN users are specified in `/etc/ppp/chap-secrets`. The format of this file is: