How To Enable FirewallD GUI on CentOS 7 with Efficient Steps
In this guide, we intend to teach you How To Enable FirewallD GUI on CentOS 7. A properly configured firewall is one of the most important tasks of any Linux system administrator. Firewalld is a complete firewall solution and an alternative to the iptables service that can be used for dynamically managing a system’s firewall.
It is used to protect your server from unwanted traffic. Firewalld is the default firewall management tool in RHEL, CentOS, and Fedora operating systems.
The firewall-cmd is part of the firewalld application that can be used for managing the firewall. Firewalld provides a dynamically managed firewall and has support for IPv4, IPv6 firewall settings, ethernet bridges, and IP sets
Those who are not comfortable with the command line can follow this guide on the Orcacore website to install the FirewallD GUI. This tutorial offers an efficient guide to How To Enable FirewallD GUI on CentOS 7.
To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on the Initial Server Setup with CentOS 7.
Install FirewallD on CentOS 7
First, you need to update your local package index with the command below:
sudo yum update -y
If you don’t have firewalld already on your system, then you have to install it. Run the command below to install the firewalld:
sudo yum install firewalld -y
When your installation is completed, start and enable your service with the following commands:
# sudo systemctl start firewalld
# sudo systemctl enable firewalld
Verify your FirewallD service is active and running on CentOS 7:
sudo systemctl status firewalld

If you are interested in the command line utility, you can follow this guide: Set Up a Firewall with FirewallD on CentOS 7.
Install FirewallD GUI on CentOS 7
Now that you have Firewalld installed on your server, you can install the graphical user interface program for it. The packages are available in the default CentOS 7 repository.
To do this, run the command below:
sudo yum install firewall-config -y
Note: If you are using the KDE desktop, you can also go for the Plasma Control panel:
sudo yum install plasma-firewall-firewalld
Run FirewallD GUI on CentOS 7
At this point, you can start managing the ports and services in Firewalld with the help of mouse clicks on CentOS 7.
To run your FirewallD GUI, go to the Application launcher and find the FirewallD you have installed.
You will see:

Remove FirewallD GUI Tool
If you don’t want to use this firewall GUI tool anymore, you can remove the same using the DNF package manager:
sudo yum remove firewall-config -y
That’s it. You are done.
Conclusion
At this point, you learn to enable FirewallD GUI on CentOS 7. It simplifies configuring rules and zones, making firewall management more accessible for users who prefer graphical tools.
Hope you enjoy it. Please subscribe to us on Facebook, X, and YouTube.
Also, you may like these articles:
How To Install PHP 7.3 on CentOS 7
How To Install Dropbox on CentOS 7
Set up Ntopng on CentOS 7
How To Install Grafana on CentOS 7
Alternative Solutions to Enabling and Managing Firewalld on CentOS 7
While the GUI provides a user-friendly interface, alternative methods exist for managing Firewalld on CentOS 7. These alternatives offer different advantages, such as automation, remote management, and integration with other systems. Let’s explore two different ways to solve the problem of managing Firewalld.
1. Using Ansible for Automated Firewall Management
Ansible is a powerful automation tool that allows you to manage and configure systems remotely using playbooks. You can use Ansible to automate the process of installing, configuring, and managing Firewalld on multiple CentOS 7 servers. This approach is particularly useful for managing large-scale deployments where manual configuration is impractical. This allows for efficient management and helps you to enable FirewallD GUI on CentOS 7.
Explanation:
Ansible playbooks are written in YAML format and define the desired state of the system. For Firewalld management, you can create playbooks that install the necessary packages, start the Firewalld service, configure zones, and add rules. Ansible uses SSH to connect to the target servers and execute the tasks defined in the playbook.
Example Ansible Playbook:
---
- hosts: all
become: true
tasks:
- name: Install Firewalld
yum:
name: firewalld
state: present
- name: Start and Enable Firewalld Service
service:
name: firewalld
state: started
enabled: true
- name: Add HTTP Service to the Public Zone
firewalld:
service: http
permanent: true
state: enabled
zone: public
- name: Reload Firewalld
systemd:
name: firewalld
state: reloaded
How to use:
- Install Ansible: On your control machine (where you’ll run the playbook), install Ansible using
pip install ansible
. - Create Inventory File: Create an inventory file that lists the CentOS 7 servers you want to manage. This file typically resides in
/etc/ansible/hosts
. - Write the Playbook: Create a YAML file (e.g.,
firewall.yml
) with the playbook content as shown above. - Run the Playbook: Execute the playbook using the command
ansible-playbook firewall.yml -i /etc/ansible/hosts
.
Advantages:
- Automation: Automates the entire process of Firewalld configuration, reducing manual effort and the risk of errors.
- Scalability: Allows you to manage Firewalld on multiple servers simultaneously.
- Idempotency: Ansible ensures that the desired state is achieved, even if the playbook is run multiple times.
- Version Control: Playbooks can be stored in version control systems, allowing you to track changes and revert to previous configurations.
2. Using Cockpit Web Console for Remote Management
Cockpit is a web-based interface that allows you to manage your CentOS 7 server through a web browser. It provides a user-friendly interface for monitoring system performance, managing services, and configuring Firewalld. This provides an alternative way to enable FirewallD GUI on CentOS 7.
Explanation:
Cockpit can be installed on the CentOS 7 server and accessed through a web browser using the server’s IP address or hostname on port 9090. Once logged in, you can navigate to the "Networking" section to configure Firewalld. Cockpit provides a graphical interface for adding and removing services, opening and closing ports, and managing zones.
Installation and Configuration:
-
Install Cockpit:
sudo yum install cockpit -y
-
Start and Enable Cockpit:
sudo systemctl start cockpit.socket sudo systemctl enable cockpit.socket
-
Open Firewall Port (if necessary): If you are accessing the Cockpit interface from a remote machine, you may need to open port 9090 in Firewalld:
sudo firewall-cmd --add-service=cockpit --permanent sudo firewall-cmd --reload
- Access Cockpit: Open your web browser and navigate to
https://your_server_ip:9090
. Log in with your server credentials. - Manage FirewallD: Navigate to the "Networking" section within the Cockpit interface to manage Firewalld.
Advantages:
- Remote Management: Allows you to manage Firewalld from any device with a web browser.
- User-Friendly Interface: Provides a graphical interface that is easier to use than the command line for some users.
- Centralized Management: Can be used to manage multiple CentOS 7 servers from a single Cockpit instance.
- Monitoring Capabilities: Offers system performance monitoring tools in addition to firewall management.
These alternative solutions provide flexible options for managing Firewalld on CentOS 7, catering to different needs and preferences. While the GUI is suitable for local, interactive management, Ansible and Cockpit offer automation and remote access capabilities, making them ideal for larger and more complex environments. How To Enable FirewallD GUI on CentOS 7 is achievable through various methods, ensuring you can choose the best approach for your specific situation.