From acecba25f2c4a550317ed21e5ddca998457afa7b Mon Sep 17 00:00:00 2001 From: Hugh Ratsch Date: Tue, 18 Feb 2025 19:56:32 -0600 Subject: [PATCH] updated notes --- src/rhcsa.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/rhcsa.md b/src/rhcsa.md index 5687c80..3c72446 100644 --- a/src/rhcsa.md +++ b/src/rhcsa.md @@ -743,8 +743,22 @@ sudo dnf repolist # List all repositories ## Understand and Configure Firewalls ### firewall-cmd +> Note: firewall-cmd is used to manage the firewall rules. ```bash sudo firewall-cmd --get-active-zones # Display the active zones sudo firewall-cmd --get-default-zone # Display the default zone sudo firewall-cmd --get-zones # Display the zones -``` \ No newline at end of file + +sudo firewall-cmd --list-all # Display all the rules in the firewall + +sudo firewall-cmd --zone=public --add-service=http --permanent # Add the http service to the public zone +sudo firewall-cmd --zone=public --add-port=80/tcp --permanent # Add the port 80/tcp to the public zone +sudo firewall-cmd --zone=public --add-protocol=tcp --permanent # Add the tcp protocol to the public zone + +sudo firewall-cmd --reload # Reload the firewall +``` + +### port reference +```bash +sudo less /etc/services # Display the services +```