mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-01 18:55:31 +02:00
Merge pull request #259 from donoftime/firewall-cmd
Add page for firewall-cmd in linux
This commit is contained in:
commit
b1959dd165
1 changed files with 23 additions and 0 deletions
23
pages/linux/firewall-cmd.md
Normal file
23
pages/linux/firewall-cmd.md
Normal file
|
@ -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`
|
Loading…
Add table
Reference in a new issue