1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 23:42:07 +02:00
tldr/pages/linux/firewall-cmd.md
2016-01-08 09:38:59 +01:00

23 lines
645 B
Markdown

# 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`