Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:wireguard [2024/09/13 12:10] – [Host 1 and Host 2] darrontools:wireguard [2024/09/13 13:03] (current) darron
Line 1: Line 1:
 ====WireGuard==== ====WireGuard====
  
-Work-in-progress+Easy to setup VPN
 ===Install=== ===Install===
 +
 +== Linux==
  
 This install may replace the kernel, if so, reboot afterward. This install may replace the kernel, if so, reboot afterward.
Line 13: Line 15:
  
  
-===Setup=== 
  
-[[https://www.wireguard.com/quickstart/|Guide]].+===Setup===
  
-===Log===+==Configure VPN==
  
-==Host 1 and Host 2==+__Host 1 and Host 2__
 <code> <code>
 ip link add dev wg0 type wireguard ip link add dev wg0 type wireguard
 </code> </code>
  
-==Host 1==+__Host 1__
  
 <code> <code>
Line 30: Line 31:
 </code> </code>
  
-==Host 2==+__Host 2__
  
 <code> <code>
Line 36: Line 37:
 </code> </code>
  
-===Host 1 and Host 2===+__Host 1 and Host 2__
  
 <code> <code>
Line 59: Line 60:
 PublicKey = PUBLIC-KEY PublicKey = PUBLIC-KEY
 AllowedIPs = 0.0.0.0/0 AllowedIPs = 0.0.0.0/0
 +Endpoint x.x.x.x:1234
 </code> </code>
  
 +==Create VPN==
 +
 +__Host 1 and Host 2__
 +
 +<code>
 wg setconf wg0 /etc/wireguard/wg0.conf wg setconf wg0 /etc/wireguard/wg0.conf
 +ip link set up dev wg0
 +</code>
 +
 +__Host 1__
 +
 +<code>
 +ping -c 1 192.168.44.11
 +PING 192.168.44.11 (192.168.44.11) 56(84) bytes of data.
 +64 bytes from 192.168.44.11: icmp_seq=1 ttl=64 time=30.4 ms
 +
 +--- 192.168.44.11 ping statistics ---
 +1 packets transmitted, 1 received, 0% packet loss, time 0ms
 +rtt min/avg/max/mdev = 30.409/30.409/30.409/0.000 ms
 +</code>
 +
 +__Host 2__
 +
 +<code>
 +ping -c 1 192.168.44.10
 +PING 192.168.44.10 (192.168.44.10) 56(84) bytes of data.
 +64 bytes from 192.168.44.10: icmp_seq=1 ttl=64 time=30.4 ms
 +
 +--- 192.168.44.10 ping statistics ---
 +1 packets transmitted, 1 received, 0% packet loss, time 0ms
 +rtt min/avg/max/mdev = 30.359/30.359/30.359/0.000 ms
 +</code>
 +
 +==Destroy VPN==
 +
 +__Host 1 and Host 2__
 +
 +
 +<code>
 +ip link delete dev wg0
 +</code>
 +
 +===Resources===
 +
 +[[https://www.wireguard.com/quickstart/|Setup guide]].
 +
 +[[https://www.wireguard.com/install/|Install guide]]