Rocky Linux

How to Start and Stop Firewall on Rocky Linux 9

A firewall is a security system that monitors and manages the network traffic based on predetermined security parameters. Firewalld is the default firewall of Rocky Linux 9, a dynamic firewall system that offers a simple way to manage the firewalls in Linux. Firewalld supports the firewall-cmd, the command-line tool to administrate and modify the firewall rules from the terminal.

Hence, a firewall is an important system utility to maintain a secure network for the device. Although firewall comes as a preinstalled utility in Rocky Linux 9, many beginners need to learn how to start or stop it. In this short tutorial, we will explain the complete method to start and stop the firewall on Rocky Linux 9.

How to Start and Stop Firewall on Rocky Linux 9

Let’s first verify that the firewalld services are working on the Rocky Linux system. Run the following command for it:

systemctl status firewalld

As the previous image displays, the firewalld is active on the system. If it is inactive, you can run the following command:

sudo systemctl start firewalld

Once you are done, restart the system to make the changes successful. Furthermore, you can run the following command to verify the service:

sudo firewall-cmd --state

If you want to stop the firewalld service in the system, execute the following command:

sudo systemctl stop firewalld

Once you are done with the previous command, check if the service is inactive:

sudo systemctl status firewalld

Moreover, you can disable the firewalld service by running the following command in the terminal:

sudo systemctl disable firewalld

Similarly, you can enable the firewalld through the following command:
[cc lang=”bash” width=”100%” height=”100%” escaped=”true” theme=”blackboard” nowrap=”0″]
sudo systemctl enable firewalld

Conclusion

This is how you can easily start and stop the firewall on Rocky Linux. A firewall is an essential system utility to provide higher network security. The default firewall of Rocky Linux 9 is firewalld, so this tutorial revolves around enabling and disabling firewalld easily. Moreover, we don’t recommend you to stop or disable the firewall from the system because it can create major security and privacy-related issues.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.