2018-08-20 22:43:45 +02:00
|
|
|
Sur le serveur :
|
|
|
|
|
|
|
|
~~~
|
|
|
|
# cd /root/wg
|
|
|
|
# umask 077
|
|
|
|
# wg genkey > private
|
2018-08-20 23:46:06 +02:00
|
|
|
# ip link add wg0 type wireguard
|
2018-08-20 22:43:45 +02:00
|
|
|
# ip address add dev wg0 10.10.10.1/24
|
|
|
|
# wg set wg0 private-key ./private
|
|
|
|
# ip link set wg0 up
|
|
|
|
# wg
|
|
|
|
# wg set wg0 peer ${La clé publique du client} allowed-ips 10.10.10.2/32 endpoint ${IPLAN client:port}
|
|
|
|
~~~
|
|
|
|
|
|
|
|
Sur le client :
|
|
|
|
|
|
|
|
~~~
|
|
|
|
# cd /root/wg
|
|
|
|
# umask 077
|
|
|
|
# wg genkey > private
|
2018-08-20 23:46:06 +02:00
|
|
|
# ip link add wg0 type wireguard
|
2018-08-20 22:43:45 +02:00
|
|
|
# ip address add dev wg0 10.10.10.2/24
|
|
|
|
# wg set wg0 private-key ./private
|
|
|
|
# ip link set wg0 up
|
|
|
|
# wg
|
|
|
|
# wg set wg0 peer ${La clé publique du serveur} allowed-ips 10.10.10.1/32 endpoint ${IPWAN serveur:port}
|
|
|
|
~~~
|