Add Wireguard
33
Wireguard.md
Normal file
33
Wireguard.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Client
|
||||
|
||||
`sudo apt install wireguard`
|
||||
|
||||
`sudo nano /etc/wireguard/wg0.conf`
|
||||
|
||||
скачать конфиг с wg-easy сервера
|
||||
и отредактировать - убрать dns
|
||||
endpoint = `vpnwg.ulakar.com:51820`
|
||||
|
||||
```ini
|
||||
[Interface]
|
||||
PrivateKey = xxx
|
||||
Address = 10.8.0.4/24, fdcc:ad94:bacf:61a4::cafe:8/112
|
||||
# отключить DNS - не используем для wg сети
|
||||
#DNS = 1.1.1.1, 2606:4700:4700::1111
|
||||
MTU = 1420
|
||||
|
||||
[Peer]
|
||||
PublicKey = xxx
|
||||
PresharedKey = xxx
|
||||
AllowedIPs = 10.8.0.0/24
|
||||
PersistentKeepalive = 25
|
||||
Endpoint = vpnwg.ulakar.com:51820
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo systemctl enable wg-quick@wg0
|
||||
sudo systemctl start wg-quick@wg0
|
||||
|
||||
sudo ufw allow in on wg0 to any port 22
|
||||
```
|
||||
Reference in New Issue
Block a user