Article information
Published on:
Last update:
Reading time: 1 - 2 minutes
Tools: View source Suggest edit
Setting up Wireguard
It is time to learn something new again, his time it is the VPN solution Wireguard
Internals
Wireguard is based around a TUN network interface. This network interface has multiple properties:
The public and private keys are used for encryption of the traffic. The pre-shared key is a key that is the same between all sides.
An single node running wireguard can connect to 1 or multiple peers.
Setting up
The simplest way to get started is using a config generator: https://www.wireguardconfig.com/. The only thing you have to do on your own is to fill in a proper endpoint address for your server. Note that this tool does not support IPv6 at te moment.
After generating, you end up with the following configs:
Server:
Client 1:
Repeat for the other clients
As you can see, config files are straight forward.
Now becomes the slightly harder step, actually using them. For the server, place the server file in the directory /etc/wireguard/
. Then enable auto start for the vpn using sudo systemctl enable wg-quick@<config file name excluding .conf>
followed by starting the VPN via sudo systemctl start wg-quick@<config file name excluding .conf>
.