From Fedora Project Wiki

(Created page with "{{QA/Test_Case |description=This test case ensures that the `firewalld` service, which provides dynamic firewall management, is functioning correctly alongside the provided filesystem configuration from `firewalld-filesystem`. |setup= # Ensure that `firewalld` and `firewalld-filesystem` packages are installed. If not, install them with the command: ``sudo dnf install firewalld firewalld-filesystem`` # Start the firewalld service with: ``sudo systemctl start firewalld`` |...")
 
No edit summary
 
Line 5: Line 5:
# Start the firewalld service with: ``sudo systemctl start firewalld``
# Start the firewalld service with: ``sudo systemctl start firewalld``
|actions=
|actions=
# Check the status of firewalld: ``sudo firewall-cmd --state``
# Check the status of firewalld: ''sudo firewall-cmd --state''
# List the default zones: ``sudo firewall-cmd --get-default-zone``
# List the default zones: ``sudo firewall-cmd --get-default-zone``
# Add an example service to the default zone, for instance: ``sudo firewall-cmd --add-service=http``
# Add an example service to the default zone, for instance: ``sudo firewall-cmd --add-service=http``

Latest revision as of 13:49, 21 August 2023

Description

This test case ensures that the firewalld service, which provides dynamic firewall management, is functioning correctly alongside the provided filesystem configuration from firewalld-filesystem.

Setup

  1. Ensure that firewalld and firewalld-filesystem packages are installed. If not, install them with the command: sudo dnf install firewalld firewalld-filesystem
  2. Start the firewalld service with: sudo systemctl start firewalld

How to test

  1. Check the status of firewalld: sudo firewall-cmd --state
  2. List the default zones: sudo firewall-cmd --get-default-zone
  3. Add an example service to the default zone, for instance: sudo firewall-cmd --add-service=http
  4. Reload firewalld to apply changes: sudo firewall-cmd --reload
  5. Verify that the service is added: sudo firewall-cmd --list-services
  6. Remove the added service: sudo firewall-cmd --remove-service=http
  7. Reload firewalld to apply changes: sudo firewall-cmd --reload
  8. Verify that the service is removed: sudo firewall-cmd --list-services

Expected Results

  1. The first command should indicate that firewalld is running.
  2. The second command should list the default zone (e.g., public).
  3. After adding the service, the verification command should list the "http" service in the active zone.
  4. After removing the service, the "http" service should no longer be listed for the active zone.