How to stop and disable the firewall on CentOS 8

A firewall is a security feature that filters incoming and outgoing traffic and blocks potentially malicious applications. In addition, the firewall gives the system administrator the right to determine which services and ports are allowed, and which services and ports are blocked or blocked. In this tutorial, you will learn how to stop and disable the firewall on CentOS 8.

On Linux, there are many firewall systems. The most commonly used firewalls are “Firewall” and “Iptables”. Firewalld is a front-end dynamic firewall management service that is available by default on both CentOS and Fedora servers. Firewalld is a powerful firewall management service that has replaced Iptables. It manages both IPv4 and IPv6 traffic.

Let’s see how to stop and disable the firewall on CentOS 8.

How to stop and disable the firewall

Turning off or disabling the firewall is usually not a good idea. However, some applications may not work properly while the firewall is active, which may force you to temporarily stop or disable it.

For users using CentOS 8 / RHEL 8 and Fedora 20 and later, follow these steps to stop and disable Firewalld.

1) How to check the status of Firewalld

Log in to the server via SSH and run the following command to verify or check the status of the firewall.

# systemctl status firewalld

Sample outputCheck the status of the firewall

From the output above, we can clearly see that Firewalld is up and running. Now let’s see how to stop the firewall.

2) How to stop Firewalld

To stop the firewall, issue the following command:

# systemctl stop firewalld

Sample outputHow to stop and disable firewalld

3) How to disable Firewalld

Finally, to disable the firewall at startup, run the following command:

# systemctl disable firewalld

Sample output

How to stop and disable firewalld

After disabling the firewall, we need to verify that the firewall is indeed disabled. Again, to check the status of firewalld, issue the following command:

# systemctl status firewalld

Sample output

Verify firewalld is disabled

Big! Now we are sure that the firewall is stopped and disabled.

in conclusion

It is always recommended to always keep the firewall active to block unnecessary services and traffic. In this way, you will protect your system from possible threats and attacks. Always remember to turn it back on after disabling it.

Sidebar