How To Install wireguard-tools on CentOS 8
Introduction
In this tutorial we learn how to install wireguard-tools
on CentOS 8.
What is wireguard-tools
WireGuard is a novel VPN that runs inside the Linux Kernel and uses state-of-the-art cryptography (the “Noise” protocol). It aims to be faster, simpler, leaner, and more useful than IPSec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. It runs over UDP. This package provides the wg binary for controlling WireGuard.
We can use yum
or dnf
to install wireguard-tools
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install wireguard-tools.
Install wireguard-tools on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install wireguard-tools
using dnf
by running the following command:
sudo dnf -y install wireguard-tools
Install wireguard-tools on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install wireguard-tools
using yum
by running the following command:
sudo yum -y install wireguard-tools
How To Uninstall wireguard-tools on CentOS 8
To uninstall only the wireguard-tools
package we can use the following command:
sudo dnf remove wireguard-tools
wireguard-tools Package Contents on CentOS 8
/etc/wireguard
/usr/bin/wg
/usr/bin/wg-quick
/usr/lib/.build-id
/usr/lib/.build-id/c9
/usr/lib/.build-id/c9/2d492bbedd16ed28af41f0359c4f8af9206ae8
/usr/lib/systemd/system/wg-quick.target
/usr/lib/systemd/system/[email protected]
/usr/share/bash-completion/completions/wg
/usr/share/bash-completion/completions/wg-quick
/usr/share/doc/wireguard-tools
/usr/share/doc/wireguard-tools/README.md
/usr/share/doc/wireguard-tools/contrib
/usr/share/doc/wireguard-tools/contrib/dns-hatchet
/usr/share/doc/wireguard-tools/contrib/dns-hatchet/README
/usr/share/doc/wireguard-tools/contrib/dns-hatchet/apply.sh
/usr/share/doc/wireguard-tools/contrib/dns-hatchet/hatchet.bash
/usr/share/doc/wireguard-tools/contrib/embeddable-wg-library
/usr/share/doc/wireguard-tools/contrib/embeddable-wg-library/Makefile
/usr/share/doc/wireguard-tools/contrib/embeddable-wg-library/README
/usr/share/doc/wireguard-tools/contrib/embeddable-wg-library/test.c
/usr/share/doc/wireguard-tools/contrib/embeddable-wg-library/wireguard.c
/usr/share/doc/wireguard-tools/contrib/embeddable-wg-library/wireguard.h
/usr/share/doc/wireguard-tools/contrib/external-tests
/usr/share/doc/wireguard-tools/contrib/external-tests/go
/usr/share/doc/wireguard-tools/contrib/external-tests/go/main.go
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell/Setup.hs
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell/package.yaml
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell/src
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell/src/Data
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell/src/Data/Time
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell/src/Data/Time/TAI64.hs
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell/src/Main.hs
/usr/share/doc/wireguard-tools/contrib/external-tests/haskell/stack.yaml
/usr/share/doc/wireguard-tools/contrib/external-tests/python
/usr/share/doc/wireguard-tools/contrib/external-tests/python/main.py
/usr/share/doc/wireguard-tools/contrib/external-tests/rust
/usr/share/doc/wireguard-tools/contrib/external-tests/rust/Cargo.toml
/usr/share/doc/wireguard-tools/contrib/external-tests/rust/src
/usr/share/doc/wireguard-tools/contrib/external-tests/rust/src/main.rs
/usr/share/doc/wireguard-tools/contrib/extract-handshakes
/usr/share/doc/wireguard-tools/contrib/extract-handshakes/Makefile
/usr/share/doc/wireguard-tools/contrib/extract-handshakes/README
/usr/share/doc/wireguard-tools/contrib/extract-handshakes/extract-handshakes.sh
/usr/share/doc/wireguard-tools/contrib/extract-handshakes/offset-finder.c
/usr/share/doc/wireguard-tools/contrib/extract-keys
/usr/share/doc/wireguard-tools/contrib/extract-keys/Makefile
/usr/share/doc/wireguard-tools/contrib/extract-keys/README
/usr/share/doc/wireguard-tools/contrib/extract-keys/config.c
/usr/share/doc/wireguard-tools/contrib/extract-keys/extract-keys.c
/usr/share/doc/wireguard-tools/contrib/highlighter
/usr/share/doc/wireguard-tools/contrib/highlighter/Makefile
/usr/share/doc/wireguard-tools/contrib/highlighter/README
/usr/share/doc/wireguard-tools/contrib/highlighter/fuzz.c
/usr/share/doc/wireguard-tools/contrib/highlighter/gui
/usr/share/doc/wireguard-tools/contrib/highlighter/gui/highlight.cpp
/usr/share/doc/wireguard-tools/contrib/highlighter/gui/highlight.pro
/usr/share/doc/wireguard-tools/contrib/highlighter/highlight.c
/usr/share/doc/wireguard-tools/contrib/highlighter/highlighter.c
/usr/share/doc/wireguard-tools/contrib/highlighter/highlighter.h
/usr/share/doc/wireguard-tools/contrib/json
/usr/share/doc/wireguard-tools/contrib/json/README
/usr/share/doc/wireguard-tools/contrib/json/wg-json
/usr/share/doc/wireguard-tools/contrib/keygen-html
/usr/share/doc/wireguard-tools/contrib/keygen-html/README
/usr/share/doc/wireguard-tools/contrib/keygen-html/keygen.html
/usr/share/doc/wireguard-tools/contrib/keygen-html/wireguard.js
/usr/share/doc/wireguard-tools/contrib/launchd
/usr/share/doc/wireguard-tools/contrib/launchd/README
/usr/share/doc/wireguard-tools/contrib/launchd/com.wireguard.wg0.plist
/usr/share/doc/wireguard-tools/contrib/nat-hole-punching
/usr/share/doc/wireguard-tools/contrib/nat-hole-punching/README
/usr/share/doc/wireguard-tools/contrib/nat-hole-punching/nat-punch-client.c
/usr/share/doc/wireguard-tools/contrib/nat-hole-punching/nat-punch-server.c
/usr/share/doc/wireguard-tools/contrib/ncat-client-server
/usr/share/doc/wireguard-tools/contrib/ncat-client-server/README
/usr/share/doc/wireguard-tools/contrib/ncat-client-server/client-quick.sh
/usr/share/doc/wireguard-tools/contrib/ncat-client-server/client.sh
/usr/share/doc/wireguard-tools/contrib/ncat-client-server/server.sh
/usr/share/doc/wireguard-tools/contrib/reresolve-dns
/usr/share/doc/wireguard-tools/contrib/reresolve-dns/README
/usr/share/doc/wireguard-tools/contrib/reresolve-dns/reresolve-dns.sh
/usr/share/doc/wireguard-tools/contrib/sticky-sockets
/usr/share/doc/wireguard-tools/contrib/sticky-sockets/README
/usr/share/doc/wireguard-tools/contrib/sticky-sockets/sticky-sockets.c
/usr/share/doc/wireguard-tools/contrib/synergy
/usr/share/doc/wireguard-tools/contrib/synergy/README
/usr/share/doc/wireguard-tools/contrib/synergy/synergy-client.sh
/usr/share/doc/wireguard-tools/contrib/synergy/synergy-server.sh
/usr/share/licenses/wireguard-tools
/usr/share/licenses/wireguard-tools/COPYING
/usr/share/man/man8/wg-quick.8.gz
/usr/share/man/man8/wg.8.gz
References
Summary
In this tutorial we learn how to install wireguard-tools
on CentOS 8 using yum and dnf.