mirror of
https://github.com/hwdsl2/setup-ipsec-vpn.git
synced 2026-05-17 08:05:45 +03:00
Update docs
This commit is contained in:
@@ -4,17 +4,17 @@
|
||||
|
||||
By default, a single user account for VPN login is created. If you wish to add, edit or remove users, read this document.
|
||||
|
||||
First, the IPsec PSK (pre-shared key) is stored in `/etc/ipsec.secrets`. To change to a new PSK, just edit this file.
|
||||
First, the IPsec PSK (pre-shared key) is stored in `/etc/ipsec.secrets`. To change to a new PSK, just edit this file. All VPN users will share the same IPsec PSK.
|
||||
|
||||
```bash
|
||||
%any %any : PSK "<VPN IPsec PSK>"
|
||||
%any %any : PSK "your_ipsec_pre_shared_key"
|
||||
```
|
||||
|
||||
For `IPsec/L2TP`, VPN users are specified in `/etc/ppp/chap-secrets`. The format of this file is:
|
||||
|
||||
```bash
|
||||
"<VPN User 1>" l2tpd "<VPN Password 1>" *
|
||||
"<VPN User 2>" l2tpd "<VPN Password 2>" *
|
||||
"your_vpn_username_1" l2tpd "your_vpn_password_1" *
|
||||
"your_vpn_username_2" l2tpd "your_vpn_password_2" *
|
||||
... ...
|
||||
```
|
||||
|
||||
@@ -23,16 +23,16 @@ You can add more users, use one line for each user. DO NOT use these characters
|
||||
For `IPsec/XAuth ("Cisco IPsec")`, VPN users are specified in `/etc/ipsec.d/passwd`. The format of this file is:
|
||||
|
||||
```bash
|
||||
<VPN User 1>:<VPN Password 1 (hashed)>:xauth-psk
|
||||
<VPN User 2>:<VPN Password 2 (hashed)>:xauth-psk
|
||||
your_vpn_username_1:your_vpn_password_1_hashed:xauth-psk
|
||||
your_vpn_username_2:your_vpn_password_2_hashed:xauth-psk
|
||||
... ...
|
||||
```
|
||||
|
||||
Passwords in this file are salted and hashed. This step can be done using e.g. the `openssl` utility:
|
||||
|
||||
```bash
|
||||
# The output will be <VPN Password 1 (hashed)>
|
||||
openssl passwd -1 "<VPN Password 1>"
|
||||
# The output will be your_vpn_password_1_hashed
|
||||
openssl passwd -1 'your_vpn_password_1'
|
||||
```
|
||||
|
||||
When finished, restart services:
|
||||
|
||||
Reference in New Issue
Block a user