informatique:logiciels:wireguard
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | informatique:logiciels:wireguard [2026/10/22 21:18] (current) – created pteu | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ======Wireguard====== | ||
| + | Wireguard est un logiciel client-serveur moderne permettant de créer simplement un tunnel VPN fonctionnant sur UDP entre 2 machines. Il se veut plus simple et plus performant qu' | ||
| + | |||
| + | Installer **wireguard** et les **wireguard-tools** sur le serveur. | ||
| + | |||
| + | =====Ajouter des clients===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Mais en un script : | ||
| + | <code bash> | ||
| + | #! / | ||
| + | echo " | ||
| + | |||
| + | [[ $# -ne 2 ]] && { echo ' | ||
| + | |||
| + | mask 077 | ||
| + | |||
| + | srv_pub=" | ||
| + | allowed_IPs=" | ||
| + | net_priv=" | ||
| + | DNS=" | ||
| + | |||
| + | ipv4=" | ||
| + | serv4=" | ||
| + | name=" | ||
| + | |||
| + | wg genkey | tee " | ||
| + | wg genpsk > " | ||
| + | |||
| + | echo "# $name" >> / | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo "" | ||
| + | |||
| + | echo " | ||
| + | echo " | ||
| + | echo "DNS = ${DNS}" | ||
| + | echo " | ||
| + | echo "" | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | # echo " | ||
| + | #echo " | ||
| + | |||
| + | # Print QR code scanable by the Wireguard mobile app on screen | ||
| + | qrencode -t ansiutf8 < " | ||
| + | |||
| + | wg syncconf wg0 < | ||
| + | # au cas ou: systemctl restart wg-quick@wg0 | ||
| + | </ | ||
informatique/logiciels/wireguard.txt · Last modified: 2026/10/22 21:18 by pteu