diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-10-29 22:37:48 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-10-29 22:37:48 +0200 |
commit | b0eee0b58e4cb67d3a1faae3b2acc802f71551e4 (patch) | |
tree | 00fcdbfe4bca7697cab1300ee770af97b099adc7 | |
parent | de17d29ae0f3e4bbc1e1ff61071472f051cdce75 (diff) | |
download | notes-b0eee0b58e4cb67d3a1faae3b2acc802f71551e4.tar.gz notes-b0eee0b58e4cb67d3a1faae3b2acc802f71551e4.zip |
network: added firewall-cmd notes
-rw-r--r-- | src/SUMMARY.md | 1 | ||||
-rw-r--r-- | src/network/README.md | 1 | ||||
-rw-r--r-- | src/network/firewall-cmd.md | 39 |
3 files changed, 41 insertions, 0 deletions
diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 9af0e9f..8b9fb5c 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -60,6 +60,7 @@ - [Network](./network/README.md) - [tcpdump](./network/tcpdump.md) + - [firewall-cmd](./network/firewall-cmd.md) - [Web](./web/README.md) - [html](./web/html.md) diff --git a/src/network/README.md b/src/network/README.md index 80ecc7b..0869e11 100644 --- a/src/network/README.md +++ b/src/network/README.md @@ -2,3 +2,4 @@ # Network - [tcpdump](./tcpdump.md) +- [firewall-cmd](./firewall-cmd.md) diff --git a/src/network/firewall-cmd.md b/src/network/firewall-cmd.md new file mode 100644 index 0000000..315bbd8 --- /dev/null +++ b/src/network/firewall-cmd.md @@ -0,0 +1,39 @@ +# firewall-cmd(1) + +Command line interface to the [firewalld(1)][man-firewalld] daemon. + +## List current status of the firewall +```sh +# List all services and ports for all zones. +firewall-cmd --list-all +# List all services. +firewall-cmd --list-services +# List all ports. +firewall-cmd --list-ports +``` +> Add `--zone <ZONE>` to limit output to a given `ZONE`. Use `--get-zones` to +> see all available zones. + +## Add entries +```sh +# Add a service to the firewall, use `--get-services` to list all available +# service names. +firewall-cmd --add-service <SERVICE> +# Add a specific port. +firewall-cmd --add-port 8000/tcp +``` + +## Remove entries +```sh +# Remove service. +firewall-cmd --remove-service <SERVICE> +# Remove port. +firewall-cmd --remove-port 8000/tcp +``` + +## References +- man [firewall-cmd(1)][man-firewall-cmd] +- man [firewalld(1)][man-firewalld] + +[man-firewalld]: https://firewalld.org/documentation/man-pages/firewalld.html +[man-firewall-cmd]: https://firewalld.org/documentation/man-pages/firewall-cmd.html |