From bd28888d653549c5160978357341a2eb20afcbec Mon Sep 17 00:00:00 2001 From: Don Mayo Date: Mon, 12 Jan 2015 10:45:34 -0500 Subject: [PATCH] Add page for firewall-cmd in linux --- pages/linux/firewall-cmd.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/linux/firewall-cmd.md diff --git a/pages/linux/firewall-cmd.md b/pages/linux/firewall-cmd.md new file mode 100644 index 000000000..6745696db --- /dev/null +++ b/pages/linux/firewall-cmd.md @@ -0,0 +1,23 @@ +# firewall-cmd + +> The firewalld command line client + +- View the available firewall zones + +`firewall-cmd --get-active-zones` + +- View the rules which are currently applied + +`firewall-cmd --list-all` + +- Permanently open the port for a service in the specified zone (like port `443` when in the `public` zone) + +`firewall-cmd --permanent --zone={{public}} --add-service={{https}}` + +- Permanently close the port for a service in the specified zone (like port `80` when in the `public` zone) + +`firewall-cmd --permanent --zone={{public}} --remove-service={{http}}` + +- Reload firewalld to force rule changes to take effect + +`firewall-cmd --reload`