mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
firewall-cmd: add zone change and arbitrary ports (#3815)
This commit is contained in:
parent
21580038c4
commit
c3eb93f174
1 changed files with 8 additions and 0 deletions
|
@ -10,6 +10,10 @@
|
|||
|
||||
`firewall-cmd --list-all`
|
||||
|
||||
- Permanently move the interface into the block zone, effectively blocking all communication:
|
||||
|
||||
`firewall-cmd --permanent --zone={{block}} --change-interface={{enp1s0}}`
|
||||
|
||||
- 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}}`
|
||||
|
@ -18,6 +22,10 @@
|
|||
|
||||
`firewall-cmd --permanent --zone={{public}} --remove-service={{http}}`
|
||||
|
||||
- Permanently open two arbitrary ports in the specified zone:
|
||||
|
||||
`firewall-cmd --permanent --zone={{public}} --add-port={{25565/tcp}} --add-port={{19132/udp}}`
|
||||
|
||||
- Reload firewalld to force rule changes to take effect:
|
||||
|
||||
`firewall-cmd --reload`
|
||||
|
|
Loading…
Add table
Reference in a new issue