how to install iptables legacy centos 8 code example

Example 1: install iptables centos 7

sudo yum install iptables-services
sudo systemctl start iptables
sudo systemctl enable iptables
sudo systemctl status iptables

Example 2: centos 7 install iptables

sudo systemctl stop firewalld

sudo systemctl disable firewalld

sudo systemctl mask --now firewalld

sudo yum remove firewalld

sudo yum install iptables-services

sudo systemctl start iptables

sudo systemctl enable iptables

sudo systemctl status iptables

sudo iptables -nvL