In Red Hat firewall-cmd, which sequence of commands would enable the http service in the public zone and apply the changes permanently?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

In Red Hat firewall-cmd, which sequence of commands would enable the http service in the public zone and apply the changes permanently?

Explanation:
The key idea is to modify the firewall’s configuration so the change is stored permanently, then apply it to the running firewall. To enable http in a specific zone and keep it across reboots, you add the service with the permanent flag for that zone and then reload to apply the change. Retrieving the default zone is optional but helpful to understand which zone the system uses by default. The important part is updating the public zone permanently with --permanent --zone=public --add-service=http, and then running --reload to apply those saved settings to the current firewall instance. Verifying with a service listing confirms that http is now allowed in the public zone. This approach guarantees the change sticks after reboot and is active right away. If you omit --permanent, the change would only exist in memory and vanish on reload or reboot, and if you don’t target the public zone, you risk configuring a different zone unintentionally.

The key idea is to modify the firewall’s configuration so the change is stored permanently, then apply it to the running firewall. To enable http in a specific zone and keep it across reboots, you add the service with the permanent flag for that zone and then reload to apply the change.

Retrieving the default zone is optional but helpful to understand which zone the system uses by default. The important part is updating the public zone permanently with --permanent --zone=public --add-service=http, and then running --reload to apply those saved settings to the current firewall instance. Verifying with a service listing confirms that http is now allowed in the public zone.

This approach guarantees the change sticks after reboot and is active right away. If you omit --permanent, the change would only exist in memory and vanish on reload or reboot, and if you don’t target the public zone, you risk configuring a different zone unintentionally.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy