firewall-cmd: add zone change and arbitrary ports (#3815)

client-spec/clarity
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
1 changed files with 8 additions and 0 deletions

View File

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