FirewallD Cheat Sheet

From Gejoreuy
Revision as of 10:18, 6 December 2020 by Gejor (talk | contribs) (Created page with "'''How to List Services that Allowed''' $ firewall-cmd --zone=public --list-services '''How to List Ports that Allowed''' $ firewall-cmd --zone=public --list-ports '''Ho...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to List Services that Allowed

$ firewall-cmd --zone=public --list-services

How to List Ports that Allowed

$ firewall-cmd --zone=public --list-ports

How to Allow Services Open and Permanent (As Example HTTP)

$ firewall-cmd --zone=public --permanent --add-service=http/tcp
$ firewall-cmd --reload

How to Allow Ports Open and Permanent (As Example Port 5000 TCP)

$ firewall-cmd --zone=public --permanent --add-port=5000/tcp
$ firewall-cmd --reload

How to Disable Services and Permanent (As Example HTTP Service)

$ firewall-cmd --zone=public --permanent --remove-service=http
$ firewall-cmd --reload

How to Dissable Ports and Permanent (As Example Port 5000 TCP)

$ firewall-cmd --zone=public --permanent--remove-port=5000/tcp
$ firewall-cmd --reload