User Tools

Site Tools


linux:wireguard

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:wireguard [2018/12/24 14:03]
josep
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>​
  
linux/wireguard.1545656605.txt.gz · Last modified: 2018/12/24 14:03 by josep