Check and enable firewalld in Linux

Firewalld is a firewall management solution provided by Linux.

Check if firewalld is running:

sudo firewall-cmd --state
running

Disable firewalld:

sudo systemctl disable --now firewalld

Check its state again:

sudo firewall-cmd --state
not running

Enable firewalld:

sudo systemctl disable --now firewalld
or
sudo /usr/sbin/firewalld