edit wireguard syntax

This commit is contained in:
Malin Freeborn 2025-03-26 16:32:10 +01:00
parent f398f52e55
commit 0b514b29e1
Signed by: andonome
GPG Key ID: 52295D2377F4D70F

View File

@ -4,14 +4,14 @@ VMID: 103
[Wireguard VPN quickstart](https://www.wireguard.com/quickstart) [Wireguard VPN quickstart](https://www.wireguard.com/quickstart)
Check dmzadmin for `wireguard.gpg` to know who to contact for access Check `dmzadmin` for `wireguard.gpg` to know who to contact for access
--- ---
### Client config ### Client config
client conf example Client config example
`x` is the assinged on the server as peer `x` is the assigned on the server as peer:
```conf ```conf
@ -37,7 +37,7 @@ PersistentKeepalive = 21
### Server config ### Server config
New user/client needs to provide their wireguard `publickey` and new ip on the network needs to be assigned (`x`) New user/client needs to provide their wireguard `publickey` and new ip on the network needs to be assigned (`x`)
check the server conf file `/etc/wireguard/wg0.conf` to find free address check the server config file `/etc/wireguard/wg0.conf` to find free address
```sh ```sh
sudo wg set wg0 peer <client_public_key> allowed-ips 192.168.164.x/32 sudo wg set wg0 peer <client_public_key> allowed-ips 192.168.164.x/32
@ -45,12 +45,12 @@ sudo wg set wg0 peer <client_public_key> allowed-ips 192.168.164.x/32
--- ---
Command to resolve ip clashing with current and wireguard network, if needed Command to resolve IP clashing with current and wireguard network, if needed
```shell ```shell
ip route add <ip> dev <wg0> ip route add <ip> dev <wg0>
``` ```
- `ip` you want to resove -> for wireguard vm 192.168.1.10 - `ip` you want to resolve -> for wireguard VM 192.168.1.10
- `wg0` name of the wireguard conf - `wg0` name of the wireguard config