nerdexam
CompTIA

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.

System Management

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)
  • A
    81% (29)
  • B
    6% (2)
  • C
    11% (4)
  • F
    3% (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.

Asudo ufw allow httpsCorrect

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`.

Bsudo ufw allow 22/udp

SSH primarily uses TCP for communication, not UDP, so allowing port 22/udp would not enable functional SSH access.

Csudo ufw allow 8080/tcp

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.

Dsudo ufw allow 22/tcpCorrect

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.

Esudo ufw allow http

`sudo ufw allow http` would open port 80 for non-secure HTTP, which does not satisfy the requirement for *secure* web services (HTTPS).

Fsudo ufw allow 80/tcp

`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

#Firewall configuration#ufw#SSH#HTTPS

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice