How To Install ipsec-tools on CentOS 7

In this tutorial we learn how to install ipsec-tools on CentOS 7. ipsec-tools is Tools for configuring and using IPSEC

Introduction

In this tutorial we learn how to install ipsec-tools on CentOS 7.

What is ipsec-tools

This package contains tools necessary for establishing keys for IPSEC connections including the rekeying during the connection lifetime. The main tools of this package are - setkey, a program to directly manipulate policies and SAs in the kernel - racoon, an IKEv1 keying daemon

We can use yum or dnf to install ipsec-tools on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install ipsec-tools.

Install ipsec-tools on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install ipsec-tools using yum by running the following command:

sudo yum -y install ipsec-tools

Install ipsec-tools on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install ipsec-tools

How To Uninstall ipsec-tools on CentOS 7

To uninstall only the ipsec-tools package we can use the following command:

sudo dnf remove ipsec-tools

References

Summary

In this tutorial we learn how to install ipsec-tools on CentOS 7 using yum and dnf.