Skip to content

Instantly share code, notes, and snippets.

@psct
Created July 3, 2019 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psct/9f2d8228b326a32f64b65da25bed8eeb to your computer and use it in GitHub Desktop.
Save psct/9f2d8228b326a32f64b65da25bed8eeb to your computer and use it in GitHub Desktop.
Konfigurationsdateien für WireGuard-Server auf Debian
./etc/apt/preferences.d/limit-unstable
Package: *
Pin: release a=unstable
Pin-Priority: 90
./etc/apt/sources.list.d/unstable.list
deb http://deb.debian.org/debian/ unstable main
./etc/ddclient/ddclient.conf
protocol=dynv6
use=web,if=ens18
password='Bwtn...psC9e'
meinwgv4.dynv6.net
protocol=dynv6
usev6=if,if=ens18
password='Bwtn...psC9e'
meinwgv6.dynv6.net
./etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug ens18
iface ens18 inet dhcp
# This is an autoconfigured IPv6 interface
iface ens18 inet6 auto
auto wg0
iface wg0 inet static
address 192.168.42.1
netmask 255.255.255.0
pre-up ip link add wg0 type wireguard
pre-up wg setconf wg0 /etc/wireguard/wg0.conf
up ip link set wg0 up
down ip link delete wg0
iface wg0 inet6 static
address fd00:42::1
netmask 64
./etc/sysctl.d/wireguard.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
./etc/wireguard/client1.key
ILK...LWw=
./etc/wireguard/clients/client1.conf
[Interface]
PrivateKey = ILK...LWw=
Address = 192.168.42.100/24, fd00:42::100/64
DNS = 1.1.1.1,2606:4700:4700::1111
[Peer]
PublicKey = onJ...bVE=
Endpoint = meinwgv4.dynv6.net:40404
AllowedIPs = 0.0.0.0/0, ::/0
./etc/wireguard/server.key
qF3...aUU=
./etc/wireguard/wg0.conf
[Interface]
PrivateKey = qF3...aUU=
ListenPort = 40404
[Peer]
PublicKey = qDE...Izc=
AllowedIPs = 192.168.42.100/32, fd00:42::100/128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment