User Tools

Site Tools


linux:wireguard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:wireguard [2018/12/24 01:55]
josep created
linux:wireguard [2018/12/24 14:14] (current)
josep
Line 3: Line 3:
 <​code>​ <​code>​
 umask 077 umask 077
-wg genkey | tee server_private.key | wg pubkey > server_public.key +wg genkey | tee key_server_private.key | wg pubkey > key_server_public.key 
-wg genkey | tee client_private.key | wg pubkey > client_public.key+wg genkey | tee key_client_private.key | wg pubkey > key_client_public.key
 </​code>​ </​code>​
  
Line 12: Line 12:
 Address = 192.168.99.1/​24 Address = 192.168.99.1/​24
 ListenPort = 51820 ListenPort = 51820
-PrivateKey = <server_private.key>+PrivateKey = <key_server_private.key>
 SaveConfig = false SaveConfig = false
  
Line 20: Line 20:
 [Peer] [Peer]
 #Client #Client
-PublicKey = <client_public.key>+PublicKey = <key_client_public.key>
 AllowedIPs = 192.168.99.2/​32 AllowedIPs = 192.168.99.2/​32
 </​code>​ </​code>​
Line 29: Line 29:
 Address = 192.168.99.2/​24 Address = 192.168.99.2/​24
 DNS = 8.8.8.8,​8.8.4.4 DNS = 8.8.8.8,​8.8.4.4
-PrivateKey = <client_private.key>+PrivateKey = <key_client_private.key>
  
 [Peer] [Peer]
 Endpoint = SERVER_HOSTNAME:​51820 Endpoint = SERVER_HOSTNAME:​51820
-PublicKey = <server_public.key>+PublicKey = <key_server_public.key>
 AllowedIPs = 0.0.0.0/0, ::/0 AllowedIPs = 0.0.0.0/0, ::/0
 PersistentKeepalive = 25 PersistentKeepalive = 25
 +</​code>​
 +
 +Last steps:
 +<​code>​
 +sudo wg-quick up wg0
 +sudo wg
 +sudo systemctl enable wg-quick@wg0
 </​code>​ </​code>​
  
Line 42: Line 49:
 qrencode -t ansiutf8 -l L < /​etc/​wireguard/​client_wg0.conf qrencode -t ansiutf8 -l L < /​etc/​wireguard/​client_wg0.conf
 </​code>​ </​code>​
 +
 +===== References =====
 +  * https://​github.com/​adrianmihalko/​raspberrypiwireguard
 +  * https://​github.com/​l-n-s/​wireguard-install
 +  * https://​www.wireguard.com/​install/​
 +  * https://​www.wireguard.com/​quickstart/​
 +
linux/wireguard.1545612925.txt.gz · Last modified: 2018/12/24 01:55 by josep