XK0-005 · Question #789
XK0-005 Question #789: Real Exam Question with Answer & Explanation
The correct answer is A: sudo ufw allow https. To enable secure web services (HTTPS) and SSH at the firewall level using ufw, the administrator needs to allow the https service and port 22 for TCP traffic.
Question
A systems administrator received a request to enable secure web services and SSH at the firewall level. Which of the following should the administrator use to accomplish this task? (Choose two.)
Options
- Asudo ufw allow https
- Bsudo ufw allow 22/udp
- Csudo ufw allow 8080/tcp
- Dsudo ufw allow 22/tcp
- Esudo ufw allow http
- Fsudo ufw allow 80/tcp
Explanation
To enable secure web services (HTTPS) and SSH at the firewall level using ufw, the administrator needs to allow the https service and port 22 for TCP traffic.
Common mistakes.
- B. SSH primarily uses TCP for communication, not UDP, so allowing port 22/udp would not enable functional SSH access.
- C. Port 8080/tcp is often used for alternate web services or proxies but is not the default port for secure web services (HTTPS), which uses 443/tcp.
- E.
sudo ufw allow httpwould open port 80 for non-secure HTTP, which does not satisfy the requirement for secure web services (HTTPS). - F.
sudo ufw allow 80/tcpexplicitly opens port 80 for non-secure HTTP traffic, not for secure web services (HTTPS).
Concept tested. UFW firewall rules for services
Reference. https://manpages.ubuntu.com/manpages/jammy/man8/ufw.8.html
Topics
Community Discussion
No community discussion yet for this question.