linux:wireguard
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:wireguard [2023/10/19 16:52] – ms | linux:wireguard [2023/10/19 17:01] (current) – ms | ||
---|---|---|---|
Line 38: | Line 38: | ||
</ | </ | ||
+ | ===== Client Seite ===== | ||
+ | === Nötige Pakete === | ||
+ | < | ||
+ | apt install wireguard iptables (nft) | ||
+ | </ | ||
+ | Alles als root: | ||
+ | < | ||
+ | vi / | ||
+ | |||
+ | net.ipv4.ip_forward=1 | ||
+ | </ | ||
+ | < | ||
+ | sysctl -p | ||
+ | </ | ||
+ | < | ||
+ | cd / | ||
+ | |||
+ | umask 077; wg genkey | tee privatekey | wg pubkey > publickey | ||
+ | </ | ||
+ | < | ||
+ | cd / | ||
+ | |||
+ | vi wg0.conf | ||
+ | |||
+ | [Interface] | ||
+ | PrivateKey = < | ||
+ | Address = 172.31.0.2/ | ||
+ | |||
+ | [Peer] | ||
+ | PublicKey = < | ||
+ | Endpoint = <physik. IP-Adresse vom Server>: | ||
+ | AllowedIPs = 0.0.0.0/0 | ||
+ | PersistentKeepalive = 25 | ||
+ | </ | ||
+ | |||
+ | ===== Auf beiden Seiten ===== | ||
+ | < | ||
+ | wg-quick up wg0 | ||
+ | |||
+ | wg-quick down wg0 | ||
+ | |||
+ | wg | ||
+ | |||
+ | wg showconf wg0 | ||
+ | </ |
linux/wireguard.1697727161.txt.gz · Last modified: 2023/10/19 16:52 by ms