install iptables centos 7

C++
sudo yum install iptables-services
sudo systemctl start iptables
sudo systemctl enable iptables
sudo systemctl status iptablessudo 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 -nvLiptables
Source

Also in C++: