How To Install libreswan on AlmaLinux 8

In this tutorial we learn how to install libreswan in AlmaLinux 8. libreswan is IPsec implementation with IKEv1 and IKEv2 keying protocols

Introduction

In this tutorial we learn how to install libreswan on AlmaLinux 8.

What is libreswan

Libreswan is a free implementation of IKE/IPsec for Linux. IPsec is the Internet Protocol Security and uses strong cryptography to provide both authentication and encryption services. These services allow you to build secure tunnels through untrusted networks. Everything passing through the untrusted net is encrypted by the ipsec gateway machine and decrypted by the gateway at the other end of the tunnel. The resulting tunnel is a virtual private network or VPN. This package contains the daemons and userland tools for setting up Libreswan. Libreswan also supports IKEv2 (RFC7296) and Secure Labeling Libreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04

We can use yum or dnf to install libreswan on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install libreswan.

Install libreswan on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install libreswan using dnf by running the following command:

sudo dnf -y install libreswan

Install libreswan on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install libreswan using yum by running the following command:

sudo yum -y install libreswan

How To Uninstall libreswan on AlmaLinux 8

To uninstall only the libreswan package we can use the following command:

sudo dnf remove libreswan

References

Summary

In this tutorial we learn how to install libreswan on AlmaLinux 8 using yum and dnf.