XK0-005 · Question #813
A systems administrator is working on an SFTP server configuration. Which of the following commands will best enable the connectivity to that service from the 10.10.0.0/24 network?
The correct answer is A. sudo ufw allow from 10.10.0.0/24 to any port 22. SFTP runs over SSH, which uses TCP port 22. The command 'sudo ufw allow from 10.10.0.0/24 to any port 22' is the most precise and secure rule: it restricts access to port 22 only from the specified subnet (10.10.0.0/24), following the principle of least privilege. Option B…
Question
A systems administrator is working on an SFTP server configuration. Which of the following commands will best enable the connectivity to that service from the 10.10.0.0/24 network?
Options
- Asudo ufw allow from 10.10.0.0/24 to any port 22
- Bsudo ufw allow in on eth0 to any port 22
- Csudo ufw allow from 10.10.0.0/24
- Dsudo ufw allow 0:22/tcp from 10.10.0.0
How the community answered
(47 responses)- A74% (35)
- B6% (3)
- C15% (7)
- D4% (2)
Explanation
SFTP runs over SSH, which uses TCP port 22. The command 'sudo ufw allow from 10.10.0.0/24 to any port 22' is the most precise and secure rule: it restricts access to port 22 only from the specified subnet (10.10.0.0/24), following the principle of least privilege. Option B allows port 22 on a specific interface but from any IP, which is less restrictive. Option C allows all traffic from that subnet on all ports, which is overly permissive. Option D uses invalid UFW syntax ('0:22/tcp' is not valid for a single port rule in this format).
Topics
Community Discussion
No community discussion yet for this question.