debian:other-debian:wireguard-debian

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
debian:other-debian:wireguard-debian [2018/12/30 15:27] michaeldebian:other-debian:wireguard-debian [2021/06/15 16:41] (current) michael
Line 10: Line 10:
  
 <code> <code>
-echo "deb http://deb.debian.org/debian/ unstable main> /etc/apt/sources.list.d/unstable.list +sh -c "echo 'deb http://deb.debian.org/debian buster-backports main contrib non-free' > /etc/apt/sources.list.d/buster-backports.list" 
-printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable+# apt update 
 +# apt install linux-headers-$(uname --kernel-release) 
 +# apt install wireguard
  
-# apt-get update 
-# apt-get install wireguard linux-headers-$(uname -r) 
 # reboot # reboot
  
Line 27: Line 27:
  
 <sxh bash; highlight: [2,6-7]> <sxh bash; highlight: [2,6-7]>
-[Interface]+[Interface]  
 +PrivateKey = <Dein privater Schlüssel [privatekey SERVER 1]> 
 Address = 192.168.100.1/24 Address = 192.168.100.1/24
-SaveConfig = true +SaveConfig = true  
-PostUp = iptables -FORWARD -i wg0 -j ACCEPT; iptables -I FORWARD -o wg0 -j ACCEPT +PostUp = iptables -FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 
-PostDown = iptables -FORWARD +PostDown = iptables -FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE 
-ListenPort = 53666 +ListenPort = 123
-PrivateKey = INVH3hPTDtaQVB7TkGy/qLMeEgbiiUjV2PbPF0B4+ns=+
  
 +[Peer]
 +PublicKey = <Öffentlicher Schlüssel von [SERVER 2]>
 +AllowedIPs = 192.168.0.0/24, 172.31.0.0/24
 +PersistentKeepalive = 25
 </sxh> </sxh>
 </WRAP> </WRAP>
Line 44: Line 48:
 <WRAP center box 100%> <WRAP center box 100%>
 <code> <code>
-# vim /etc/sysctl.d/99-sysctl.conf+# vim /etc/sysctl.d/99-sysctl.conf ODER /etc/sysctl.conf
 </code> </code>
  
  • debian/other-debian/wireguard-debian.txt
  • Last modified: 2021/06/15 16:41
  • by michael