XK0-005 · Question #789
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.)
The correct answer is A. sudo ufw allow https D. sudo ufw allow 22/tcp. 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
How the community answered
(36 responses)- A81% (29)
- B6% (2)
- C11% (4)
- F3% (1)
Why each option
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.
The command `sudo ufw allow https` opens port 443 for TCP traffic, which is the standard port for secure web services (HTTPS). `ufw` intelligently recognizes common service names like `https`.
SSH primarily uses TCP for communication, not UDP, so allowing port 22/udp would not enable functional SSH access.
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.
The command `sudo ufw allow 22/tcp` explicitly opens port 22 for TCP traffic, which is the standard port used by the Secure Shell (SSH) protocol, fulfilling the requirement to enable SSH access.
`sudo ufw allow http` would open port 80 for non-secure HTTP, which does not satisfy the requirement for *secure* web services (HTTPS).
`sudo ufw allow 80/tcp` explicitly opens port 80 for non-secure HTTP traffic, not for secure web services (HTTPS).
Concept tested: UFW firewall rules for services
Source: https://manpages.ubuntu.com/manpages/jammy/man8/ufw.8.html
Topics
Community Discussion
No community discussion yet for this question.