Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:wireguard [2024/09/13 12:08] – [Host 1 and Host 2] darron | tools: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 11: | Line 13: | ||
apt install wireguard | apt install wireguard | ||
</ | </ | ||
+ | |||
===Setup=== | ===Setup=== | ||
- | [[https:// | + | ==Configure VPN== |
- | ===Log=== | + | __Host |
- | + | ||
- | ==Host | + | |
< | < | ||
ip link add dev wg0 type wireguard | ip link add dev wg0 type wireguard | ||
</ | </ | ||
- | ==Host 1== | + | __Host 1__ |
< | < | ||
Line 30: | Line 31: | ||
</ | </ | ||
- | ==Host 2== | + | __Host 2__ |
< | < | ||
Line 36: | Line 37: | ||
</ | </ | ||
- | ===Host | + | __Host |
< | < | ||
Line 55: | Line 56: | ||
ListenPort = 1234 | ListenPort = 1234 | ||
PrivateKey = PRIVATE-KEY | PrivateKey = PRIVATE-KEY | ||
+ | |||
+ | [Peer] | ||
+ | PublicKey = PUBLIC-KEY | ||
+ | AllowedIPs = 0.0.0.0/0 | ||
+ | Endpoint x.x.x.x: | ||
</ | </ | ||
+ | |||
+ | ==Create VPN== | ||
+ | |||
+ | __Host 1 and Host 2__ | ||
+ | |||
+ | < | ||
+ | wg setconf wg0 / | ||
+ | ip link set up dev wg0 | ||
+ | </ | ||
+ | |||
+ | __Host 1__ | ||
+ | |||
+ | < | ||
+ | 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: | ||
+ | |||
+ | --- 192.168.44.11 ping statistics --- | ||
+ | 1 packets transmitted, | ||
+ | rtt min/ | ||
+ | </ | ||
+ | |||
+ | __Host 2__ | ||
+ | |||
+ | < | ||
+ | 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: | ||
+ | |||
+ | --- 192.168.44.10 ping statistics --- | ||
+ | 1 packets transmitted, | ||
+ | rtt min/ | ||
+ | </ | ||
+ | |||
+ | ==Destroy VPN== | ||
+ | |||
+ | __Host 1 and Host 2__ | ||
+ | |||
+ | |||
+ | < | ||
+ | ip link delete dev wg0 | ||
+ | </ | ||
+ | |||
+ | ===Resources=== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ |