

The output should look something like this: Chain INPUT (policy ACCEPT 0 packets, 0 bytes) To check the current iptables rules use the following commands: sudo iptables -nvL sudo ip6tables -nvLīy default only the SSH port 22 is open. Once the package is installed start the Iptables service: sudo systemctl start iptables sudo systemctl start ip6tablesĮnable the Iptables service to start automatically on system boot: sudo systemctl enable iptables sudo systemctl enable ip6tablesĬheck the iptables service status with: sudo systemctl status iptables sudo systemctl status ip6tables Run the following command to install the iptables-service package from the CentOS repositories: sudo yum install iptables-services Perform the following steps to install Iptables on a CentOS 7 system:


Mask the FirewallD service to prevent it from being started by another services: sudo systemctl mask -now firewalld Type the following command to stop the FirewallD service: sudo systemctl stop firewalldĭisable the FirewallD service to start automatically on system boot: sudo systemctl disable firewalld To disable the FirewallD on your CentOS 7 system How to configure firewall settings in Linux
