How To Install ipset on Rocky Linux 8

In this tutorial we learn how to install ipset on Rocky Linux 8. ipset is Manage Linux IP sets

Introduction

In this tutorial we learn how to install ipset on Rocky Linux 8.

What is ipset

IP sets are a framework inside the Linux kernel since version 2.4.x, which can be administered by the ipset utility. Depending on the type, currently an IP set may store IP addresses, (TCP/UDP) port numbers or IP addresses with MAC addresses in a way, which ensures lightning speed when matching an entry against a set. If you want to - store multiple IP addresses or port numbers and match against the collection by iptables at one swoop; - dynamically update iptables rules against IP addresses or ports without performance penalty; - express complex IP address and ports based rulesets with one single iptables rule and benefit from the speed of IP sets then ipset may be the proper tool for you.

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

Install ipset on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install ipset

Install ipset on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install ipset

How To Uninstall ipset on Rocky Linux 8

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

sudo dnf remove ipset

ipset Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/28
/usr/lib/.build-id/28/cbb10603b06cbe4db6736982800d4f4e6c24f7
/usr/sbin/ipset
/usr/share/doc/ipset
/usr/share/doc/ipset/COPYING
/usr/share/doc/ipset/ChangeLog
/usr/share/man/man8/ipset.8.gz

References

Summary

In this tutorial we learn how to install ipset on Rocky Linux 8 using yum and dnf.