VPN : qu’est ce que c’est WireGuard, et à quoi ça sert ?

Retrouvez tous les articles de Frandroid directement sur Google. Abonnez-vous à notre profil Google pour ne rien manquer !

Retrouvez tous les articles de Frandroid directement sur Google. Abonnez-vous à notre profil Google pour ne rien manquer !

apt install wireguard
cd /etc/wireguard/
umask 077; wg genkey | tee privatekey | wg pubkey > publickey
cat <<EOF > /etc/wireguard/wg0.conf
[Interface]
Address = 10.50.0.150/24
ListenPort = 51820
PrivateKey = \$(cat ./privatekey)
[Peer]
PublicKey = XXXXXXX_privatekey_de la machine_2_XXXXXXX
AllowedIPs = 10.50.0.160/32
EOF
systemctl enable --now wg-quick@wg0
apt install wireguard
cd /etc/wireguard/
umask 077; wg genkey | tee privatekey | wg pubkey > publickey
cat <<EOF > /etc/wireguard/wg0.conf
[Interface]
Address = 10.50.0.160/24
PrivateKey = \$(cat ./privatekey)
[Peer]
PublicKey = XXXXXXX_privatekey_de_la_machine_1_XXXXXXX
AllowedIPs = 10.50.0.160/32
EOF
systemctl enable --now wg-quick@wg0