Question 350
After a lab configuration change, verify: A service listens on port 8443 but clients are blocked by the active public firewalld zone. Which result most directly proves the desired system state?
Explanation
Correct Answer
`firewall-cmd --zone=public --list-ports` contains 8443/tcp and a tested authorized client connects. This check confirms the expected effect of: Use `firewall-cmd --get-active-zones`, then `firewall-cmd --zone=public --add-port=8443/tcp --permanent` and reload the firewall. It distinguishes the intended result from the original failure mechanism: Firewalld rules are zone-specific and require persistence for reboot safety.
Incorrect Answers
`nmcli -g IP4.ADDRESS,IP4.GATEWAY con show --active lablan` and `ip -4 addr` show the intended address and gateway. That verifies a separate lab task: A training host has DHCP IPv4 but requires a fixed address `192.0.2.50/24` and gateway `192.0.2.1` for a private lab subnet. It does not validate the implementation required here: Use `firewall-cmd --get-active-zones`, then `firewall-cmd --zone=public --add-port=8443/tcp --permanent` and reload the firewall.
After reconnect or reboot `nmcli con show` and `ip addr` still report the address. That verifies a separate lab task: A technician adds an IPv4 address with `ip addr add`, but it disappears after reboot. It does not validate the implementation required here: Use `firewall-cmd --get-active-zones`, then `firewall-cmd --zone=public --add-port=8443/tcp --permanent` and reload the firewall.
The port remains listed in permanent configuration and works after a controlled reboot. That verifies a separate lab task: An operator opens an authorized lab TCP port using only the runtime firewalld command, so access disappears after reboot. It does not validate the implementation required here: Use `firewall-cmd --get-active-zones`, then `firewall-cmd --zone=public --add-port=8443/tcp --permanent` and reload the firewall.