Wireguard » Historique » Version 1
sacha, 05/10/2018 11:00
1 | 1 | sacha | # Wireguard |
---|---|---|---|
2 | |||
3 | Le VPN Kiss & performant |
||
4 | |||
5 | ## Installation |
||
6 | |||
7 | https://www.wireguard.com/install/ |
||
8 | |||
9 | ## Configuration |
||
10 | |||
11 | ### Serveur |
||
12 | |||
13 | ~~~ |
||
14 | umask 077 |
||
15 | wg genkey > /etc/wireguard/private |
||
16 | wg genkey | tee /etc/wireguard/private | wg pubkey > /etc/wireguard/publickey |
||
17 | wg set wg0 private-key /etc/wireguard/private |
||
18 | ip link set wg0 up |
||
19 | |||
20 | cat << EOF > /etc/wireguard/wireguard.conf |
||
21 | [Interface] |
||
22 | ListenPort = 50000 |
||
23 | PrivateKey = `cat /etc/wireguard/private` |
||
24 | |||
25 | [Peer] |
||
26 | PublicKey = Va0X1zOpRc9471Aa3DEUUy7UkAv5aq5SojtIPqOSqwg= |
||
27 | AllowedIPs = 10.33.33.0/24 |
||
28 | Endpoint = 185.233.100.19:50000 |
||
29 | EOF |
||
30 | |||
31 | ~~~ |
||
32 | |||
33 | ### Client |
||
34 | |||
35 | ~~~ |
||
36 | umask 077 |
||
37 | wg genkey > /etc/wireguard/private |
||
38 | wg genkey | tee /etc/wireguard/private | wg pubkey > /etc/wireguard/publickey |
||
39 | wg set wg0 private-key /etc/wireguard/private |
||
40 | ip link set wg0 up |
||
41 | ~~~ |