WireGuard
Just a snippset for myself

Contents
Warning
This article was last updated on 2022-04-10, the content may be out of date.
Installation
Arch linux
|
|
Note
Users of kernels < 5.6 may also choose
wireguard-lts
or wireguard-dkms
+ linux-headers
, depending on which kernel is used.Debian
|
|
Info
For other distros, please head over to WireGuard’s official installation document
Android
Generate Keys
|
|
Client configuration
In /etc/wireguard/wg0.conf
:
|
|
Server configuration
|
|
Note
Replace
PUBLIC_INTERFACE
with your interface, such as eth0
.Enable IPv4 packet forwarding
In /etc/sysctl.d/99-sysctl.conf
, uncomment line #net.ipv4.ip_forward=1
.
To apply, reboot or run sudo sysctl -p
.
Daemonizing
Replace wg0
with the filename (without extension) you have in /etc/wireguard/
.
|
|
Restarting
|
|
Using networkmanager
to manage wireguard
Import configuration file
|
|
Note
Note: nmcli can create a WireGuard connection profile, but it does not support configuring WireGuard peers.
Usage
|
|
Disable ipv6
|
|
Futher reading
- Quick start
- WireGuard on wiki.archlinux.org