How To Install iptables-legacy on Fedora 36

In this tutorial we learn how to install iptables-legacy in Fedora 36. iptables-legacy is Legacy tools for managing Linux kernel packet filtering capabilities

Introduction

In this tutorial we learn how to install iptables-legacy on Fedora 36.

What is iptables-legacy

The iptables utility controls the network packet filtering code in the Linux kernel. This package contains the legacy tools which are obsoleted by nft-variants in iptables-nft package for backwards compatibility reasons. If you need to set up firewalls and/or IP masquerading, you should not install this package but either nftables or iptables-nft instead.

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

Install iptables-legacy on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install iptables-legacy

Install iptables-legacy on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install iptables-legacy

How To Uninstall iptables-legacy on Fedora 36

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

sudo dnf remove iptables-legacy

iptables-legacy Package Contents on Fedora 36

/usr/bin/iptables-xml
/usr/lib/.build-id
/usr/lib/.build-id/ff
/usr/lib/.build-id/ff/79541217b011878e1ae38e0a05772a5f189ef5
/usr/sbin/ip6tables
/usr/sbin/ip6tables-legacy
/usr/sbin/ip6tables-legacy-restore
/usr/sbin/ip6tables-legacy-save
/usr/sbin/ip6tables-restore
/usr/sbin/ip6tables-save
/usr/sbin/iptables
/usr/sbin/iptables-legacy
/usr/sbin/iptables-legacy-restore
/usr/sbin/iptables-legacy-save
/usr/sbin/iptables-restore
/usr/sbin/iptables-save
/usr/sbin/xtables-legacy-multi
/usr/share/doc/iptables-legacy
/usr/share/doc/iptables-legacy/INCOMPATIBILITIES
/usr/share/man/man1/iptables-xml.1.gz
/usr/share/man/man8/xtables-legacy.8.gz

References

Summary

In this tutorial we learn how to install iptables-legacy on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).