Configuration de Wireguard

 

Server (VPN) autres Server
umask 077
wg genkey > private
wg pubkey < private
ip link add wg0 type wireguard
ip addr add xxx.xxx.xxx.xxx/24 dev wg0
ip addr add xxx.xxx.xxx.xxx/24 dev wg0
wg set wg0 private-key ./private
ip link set wg0 up
ip addr
wg
wg set wg0 peer [public key server B] allowed-ips xxx.xxx.xxx.xxx/32 endpoint [IP public server B]:[port]
wg set wg0 peer [public key server A] allowed-ips xxx.xxx.xxx.xxx/32 endpoint [IP public server A]:[port]
vérifier la config avec la commande ping xxx.xxx.xxx.xxx
Auto Start on boot :

systemctl enable wg-quick@wg0