Which command shows the current default firewall zone?

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

Which command shows the current default firewall zone?

Explanation:
In firewalld, the default zone defines the policy applied to traffic that isn’t bound to a specific zone. To see which zone is currently used as the default, run firewall-cmd --get-default-zone—the command outputs the name of the default zone (for example, public or home). The other long options aren’t valid for this purpose: they don’t exist in the firewalld CLI, so they won’t return the default zone. If you want additional context, you can also inspect active zones with firewall-cmd --get-active-zones, or change the default with firewall-cmd --set-default-zone=ZONE, but for this question the command that queries the default zone is the one to use.

In firewalld, the default zone defines the policy applied to traffic that isn’t bound to a specific zone. To see which zone is currently used as the default, run firewall-cmd --get-default-zone—the command outputs the name of the default zone (for example, public or home). The other long options aren’t valid for this purpose: they don’t exist in the firewalld CLI, so they won’t return the default zone. If you want additional context, you can also inspect active zones with firewall-cmd --get-active-zones, or change the default with firewall-cmd --set-default-zone=ZONE, but for this question the command that queries the default zone is the one to use.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy