How To Install iptables-services on CentOS 7

In this tutorial we learn how to install iptables-services on CentOS 7. iptables-services is iptables and ip6tables services for iptables

Introduction

In this tutorial we learn how to install iptables-services on CentOS 7.

What is iptables-services

iptables services for IPv4 and IPv6 This package provides the services iptables and ip6tables that have been split out of the base package since they are not active by default anymore.

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

Install iptables-services on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install iptables-services

Install iptables-services 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 iptables-services using dnf by running the following command:

sudo dnf -y install iptables-services

How To Uninstall iptables-services on CentOS 7

To uninstall only the iptables-services package we can use the following command:

sudo dnf remove iptables-services

References

Summary

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