Firewalld.v7

From Thriving on the \'net
Revision as of 19:00, 28 June 2023 by Howlmc (talk | contribs) (Created page with "=YUM= yum install firewalld ==systemctl== systemctl status firewalld systemctl start firewalld systemctl enable firewalld ==View Settings== firewall-cmd --state firewall...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

YUM

yum install firewalld

systemctl

systemctl status firewalld
systemctl start firewalld
systemctl enable firewalld

View Settings

firewall-cmd --state
firewall-cmd --get-active-zones
firewall-cmd --get-zones
firewall-cmd --get-default-zone
firewall-cmd --zone=external --list-all
firewall-cmd --zone=internal --list-all
firewall-cmd --zone=public --list-all
firewall-cmd --list-services
firewall-cmd --get-services
firewall-cmd --get-icmptypes
firewall-cmd --query-panic

Adding

firewall-cmd --zone=home --remove-service=http
firewall-cmd --zone=internal --add-service=https --permanent
firewall-cmd [--zone=<zone>] --add-port=<port>[-<port>]/<protocol> [--timeout=<seconds>]

Removing

firewall-cmd --zone=home --remove-service=http
firewall-cmd --zone=internal --remove-service=https --permanent

Setting Up

For firewalld to work NetworkManager must be running.

In a non router configuration the single NIC will be assigned to public.

firewall-cmd --zone=public --list-all