A Linux system administrator has configured firewalld with several new rules in the runtime configuration to allow traffic for a web application. After successful testing, the administrator needs to persist these runtime rules so they are automatically applied after a system reboot. Which of the following commands should the administrator use?
The correct command is firewall-cmd --runtime-to-permanent. In firewalld, there is a distinction between the runtime configuration (the currently active rules) and the permanent configuration (the rules loaded on boot or reload). Changes made to the runtime configuration are lost when the service is reloaded or the system is rebooted. The --runtime-to-permanent option saves the current active runtime configuration to the permanent configuration files, ensuring the tested rules persist.
firewall-cmd --reload is incorrect because it discards the current runtime configuration and loads the permanent configuration, effectively undoing the tested changes.
firewall-cmd --permanent --add-service=http is incorrect because it only adds a single rule to the permanent configuration. It does not save all the changes made to the runtime configuration and does not make the rule immediately active in the runtime.
systemctl restart firewalld is incorrect as restarting the service also discards the runtime configuration and loads the permanent configuration from the disk.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the difference between runtime and permanent configurations in firewalld?
Open an interactive chat with Bash
Why doesn't the command `firewall-cmd --reload` persist runtime rules?
Open an interactive chat with Bash
When should you use `firewall-cmd --permanent` instead of `--runtime-to-permanent`?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access