exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 187 discussion

Actual exam question from CompTIA's XK0-005
Question #: 187
Topic #: 1
[All XK0-005 Questions]

A Linux engineer needs to block an incoming connection from the IP address 2.2.2.2 to a secure shell server and ensure the originating IP address receives a response that a firewall is blocking the connection. Which of the following commands can be used to accomplish this task?

  • A. iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j DROP
  • B. iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j RETURN
  • C. iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j REJECT
  • D. iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j QUEUE
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
bongobo
11 months, 1 week ago
both DROP & REJECT works
upvoted 2 times
...
stonefacegroupie1
1 year, 2 months ago
Selected Answer: C
I agree with Damon54
upvoted 1 times
...
Damon54
1 year, 5 months ago
Selected Answer: C
In general, use REJECT if you want the other side to know that the port is unreachable, and DROP for connections to hosts you don't want to see.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...