While preparing a CentOS Stream 9 DNS server you must open port 53 for both UDP and TCP traffic in the public zone. The change has to survive daemon reloads and system reboots, and you want the most maintainable one-line rule (that is, you prefer a predefined abstraction to listing individual ports). Which single command accomplishes this goal?
firewalld ships with an XML definition called dns.xml that already lists both 53/tcp and 53/udp. Adding that service therefore opens the correct ports in one step. Including the --permanent switch writes the rule to the persistent configuration so it is still in place after a reload or reboot. The other commands fail at least one requirement: running without --permanent is lost after a restart; adding only one port leaves the other protocol blocked; specifying both ports manually works functionally but does not use the predefined service, so it is less maintainable than the requested approach.
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 role of the '--permanent' flag in the firewall-cmd command?
Open an interactive chat with Bash
What is the difference between adding a 'service' and adding a 'port' in firewalld?
Open an interactive chat with Bash
What is the significance of the default 'public' zone in firewalld?
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...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .