Move from FirewallD to iptables on CentOS 7

Below we'll give you a list of commands to convert your CentOS 7 server from using FirewallD to iptables. Many users know and prefer iptables commands over FirewallD, and as they are based upon the same backend system there isn't any performance difference.

sudo yum install iptables-services -y
sudo systemctl stop firewalld && sudo systemctl start iptables && sudo systemctl start ip6tables
sudo systemctl disable firewalld
sudo systemctl mask firewalld
sudo systemctl enable iptables
sudo systemctl enable ip6tables
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to correctly change the hostname on CentOS 6 & 7 servers

Struggling to correctly change the hostname of your CentOS server? Not to worry, these simple...

cPanel: Firefox users see "sec_error_ocsp_try_server_later"

Problem: You've installed your SSL certificate on to your cPanel server, and most browsers are...

Installing the latest mainline kernel on CentOS 6 & 7

Many customers wish to use the latest Mainline Linux kernel on their CentOS boxes due to the...

Mass update 'contact email' address of all cPanel accounts

Recently a customer approached us about bulk changing all of their cPanel account's contact email...

Setting and syncing time on CentOS with ntp

It's important to keep your server's time and date correct and in-sync, so that logs and visitor...