Intermediate
Package: firewalld
firewall-cmd
Manage firewalld, the default firewall on RHEL-based systems.
Syntax
firewall-cmd [options]
Description
firewall-cmd controls firewalld, which organises rules into named zones with different trust levels, and supports runtime changes as well as permanent configuration that survives a reload.
Examples
sudo firewall-cmd --add-service=http --permanent
Permanently allow HTTP traffic
sudo firewall-cmd --reload
Apply permanent changes to the running configuration
sudo firewall-cmd --list-all
Show all rules for the default zone
sudo firewall-cmd --add-port=8080/tcp
Temporarily open a specific port (until reboot)
Default on RHEL, CentOS/Rocky/Alma and Fedora.