An Introduction to Firewalld

October 2, 2020 Liquid Web

In some ways, firewalld on systemd systems is easier to manage and configure than iptables. There are, for the most part, no long series of chains, jumps, accepts and denies that you need to memorize to get firewalld up and running in a basic configuration. The rules are simple and straightforward, but there is no reason you cannot still have all the power that iptables afforded.

In this video, we explain many aspects of firewalld, including starting, stopping, management, and configuration of the service.

Commands used:

systemctl enable firewalld
systemctl start firewalld
systemctl stop firewalld
systemctl restart firewalld
systemctl status firewalld
firewall-cmd --permanent --add-port=22/TCP
firewall-cmd --permanent --remove-port=444/tcp
firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --remove-service=mysql
firewall-cmd --permanent --add-source=192.168.1.100
firewall-cmd --permanent --add-source=192.168.1.0/24
firewall-cmd --permanent --remove-source=192.168.1.100

firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='192.168.1.100' reject"

firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='192.168.1.0/24' reject"

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.100" port protocol="tcp" port="3306" accept'

firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="192.168.1.100" port protocol="tcp" port="3306" accept'

firewall-cmd --reload

firewall-cmd --list-all

sudo yum install firewall-config

Video by: Justin Palmer

About the Author

Liquid Web

Liquid Web powers online content, commerce, and potential for SMB entrepreneurs and the designers, developers and digital agencies who create for them. Sign up for our <a href="https://www.liquidweb.com/blog">newsletter</a> to stay up to date with our latest content.

More Content by Liquid Web
Previous Video
How to Install Apache on a Windows Server
How to Install Apache on a Windows Server

In this video, we demonstrate how to install Apache on a Windows server.

Next Video
How to Create and Clone a Repo in GitHub on Ubuntu 18.04
How to Create and Clone a Repo in GitHub on Ubuntu 18.04

In this video, we demonstrate how to do create and clone a repository in GitHub on Ubuntu 18.04.

Learn What Qualities to Look for in Your Next Host in Our New Guide!

Download Now