How to set up WireGuard server on Debian

Setting up WireGuard server on Debian

Prerequisites

Before delving into this article guide, ensure you have all the prerequisites provided herein:

  1. Debian 11 Bullseye installed
  2. Root user access

Once you have the prerequisites mentioned above, proceed to the installation phase.

How to install and configure WireGuard on Debian 11

To install WireGuard on your Debian 11 OS, follow all steps provided herein to the later:

Step 1: Update your Debian system resources

Execute the apt command/apt-get command to install security updates for Debian 11:

sudo apt update

sudo apt upgrade

As soon as you are done, proceed to step 2

Step 2: Enable Debian backports repo

To install Debian security updates, execute the apt/apt-get command:

sudo sh -c "echo 'deb http://deb.debian.org/debian buster-backports main contrib non-free' > /etc/apt/sources.list.d/buster-backports.list"

Verify the added repo by executing the line of code below:

cat /etc/apt/sources.list.d/buster-backports.list

Once you are done, update your Debian resources before going to the next step by running this command:

sudo apt update

Note: If you are using older Debian versions, you are required to enable backports repos. However, the newer versions do not. Therefore, if you use Debian 11, you can skip step 2.

Step 3: Installing WireGuard

Before we install WireGuard, we check if it already exists in our Debian 11 OS by using this command line:

sudo apt search wireguard

After running this command, you will know if to run the install command or not. For older Debian versions, enabling backports repo is a must. Once you have enabled backports repo, run this command:

sudo apt install wireguard

For Debian 11 users who skipped step 2, run these lines of code to install WireGuard onto your operating system:

sudo apt update

sudo apt install wireguard wireguard-tools linux-headers-$(uname -r)

Note: if you are using an older version of Debian, such as Debian 10 buster, run the given commands:

sudo apt update

sudo apt -t buster-backports install wireguard wireguard-tools wireguard-dkms linux-headers-$(uname -r)
闲谈

2022/09/14 博客重建

2022-9-14 22:06:04

风险修复笔记

Tomcat 404/5xx错误页 漏洞修复

2022-8-16 23:00:12

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索