1
0
Fork 0
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:
Lukáš Zapletal 2020-03-03 18:21:21 +01:00 committed by GitHub
parent 21580038c4
commit c3eb93f174
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,10 @@
`firewall-cmd --list-all` `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): - 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}}` `firewall-cmd --permanent --zone={{public}} --add-service={{https}}`
@ -18,6 +22,10 @@
`firewall-cmd --permanent --zone={{public}} --remove-service={{http}}` `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: - Reload firewalld to force rule changes to take effect:
`firewall-cmd --reload` `firewall-cmd --reload`