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 revisionPrevious revision
Next revision
Previous revision
linux:wireguard [2023/10/19 16:52] mslinux:wireguard [2023/10/19 17:01] (current) ms
Line 38: Line 38:
 </code> </code>
  
 +===== Client Seite =====
 +=== Nötige Pakete ===
 +<code>
 +apt install wireguard iptables (nft)
 +</code>
  
 +Alles als root:
 +<code>
 +vi /etc/sysctl.conf
 +
 +net.ipv4.ip_forward=1   # soll nich auskommentiert ein
 +</code>
 +<code>
 +sysctl -p
 +</code>
 +<code>
 +cd /etc/wireguard
 +
 +umask 077; wg genkey | tee privatekey | wg pubkey > publickey
 +</code>
 +<code>
 +cd /etc/wireguard
 +
 +vi wg0.conf
 +
 +[Interface] 
 +PrivateKey = <PrivateKey vom Client>
 +Address = 172.31.0.2/32 
 +
 +[Peer] 
 +PublicKey = <PublicKey vom Server>
 +Endpoint = <physik. IP-Adresse vom Server>:51820 
 +AllowedIPs = 0.0.0.0/0
 +PersistentKeepalive = 25
 +</code>
 +
 +===== Auf beiden Seiten =====
 +<code>
 +wg-quick up wg0
 +
 +wg-quick down wg0
 +
 +wg
 +
 +wg showconf wg0
 +</code>
linux/wireguard.1697727161.txt.gz · Last modified: 2023/10/19 16:52 by ms

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki