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: | # 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
- Ensure that
firewalld
andfirewalld-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
How to test
- Check the status of firewalld: sudo firewall-cmd --state
- 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
- Reload firewalld to apply changes:
sudo firewall-cmd --reload
- Verify that the service is added:
sudo firewall-cmd --list-services
- Remove the added service:
sudo firewall-cmd --remove-service=http
- Reload firewalld to apply changes:
sudo firewall-cmd --reload
- Verify that the service is removed:
sudo firewall-cmd --list-services
Expected Results
- The first command should indicate that firewalld is running.
- The second command should list the default zone (e.g., public).
- After adding the service, the verification command should list the "http" service in the active zone.
- After removing the service, the "http" service should no longer be listed for the active zone.