Which sequence configures SSH to listen on port 2222 and restrict access to 192.168.0.0/24 while dropping others?

Study for the MTCNA Foundation Exam. Prepare with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your certification!

Multiple Choice

Which sequence configures SSH to listen on port 2222 and restrict access to 192.168.0.0/24 while dropping others?

Explanation:
The sequence works because it tightens SSH access by port and source, and relies on rule order. First, you configure SSH to listen on the non-standard port 2222. Then you add a rule that allows only the 192.168.0.0/24 network to reach port 2222. Finally, you add a drop rule for port 2222 that applies to all other sources. Since firewall rules are evaluated from top to bottom, the allowed subnet will be accepted by the first rule, and the subsequent drop rule will catch any other source addresses trying to reach port 2222, effectively denying them. This approach ensures SSH is reachable only from 192.168.0.0/24 while all other sources are blocked. The other options either block the allowed subnet, allow everyone, or place the drop in a way that would override the intended restriction.

The sequence works because it tightens SSH access by port and source, and relies on rule order. First, you configure SSH to listen on the non-standard port 2222. Then you add a rule that allows only the 192.168.0.0/24 network to reach port 2222. Finally, you add a drop rule for port 2222 that applies to all other sources. Since firewall rules are evaluated from top to bottom, the allowed subnet will be accepted by the first rule, and the subsequent drop rule will catch any other source addresses trying to reach port 2222, effectively denying them.

This approach ensures SSH is reachable only from 192.168.0.0/24 while all other sources are blocked. The other options either block the allowed subnet, allow everyone, or place the drop in a way that would override the intended restriction.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy