XK0-005 practice question 1 of 10
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?
Full set: 487 questionsIn Linux iptables, the -j REJECT target is used to refuse a connection request actively. Unlike the -j DROP target, which silently drops incoming packets without sending any response to the sender, -j REJECT sends an explicit error packet (such as an ICMP destination-unreachable message or TCP RST) back to the originating IP address (2.2.2.2). This informs the sender immediately that the connection attempt was rejected by packet filtering policies. In this scenario, the administrator specifically requires the originating host to receive notification that the firewall is blocking the connection to the SSH port (--dport ssh), making -j REJECT the appropriate target command option.
A: The DROP target silently discards incoming packets, causing the originating IP address to time out without receiving an explicit firewall response notification. B: The RETURN target causes execution to stop traversing the current chain and resume at the calling chain, failing to block or respond to the connection. D: The QUEUE target passes the packet to user-space applications for inspection, rather than directly blocking the connection and returning a rejection response.
Linux man-pages project: iptables-extensions(8) man page, REJECT section.
Red Hat Enterprise Linux 8: Securing Networks, Chapter 5 "Using iptables".
Keep practicing
Take the free XK0-005 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other XK0-005 practice questions
- Question 2A systems administrator identifies multiple processes in a zombie state. Which of the fol…
- Question 3An administrator made a change to a system's network configuration. Which of the followin…
- Question 4Which of the following can reduce the attack surface area in relation to Linux hardening?
- Question 5A Linux administrator needs to check extended permissions applied to the directory test. …
- Question 6A Linux systems administrator is updating code. After completing the update, the administ…
- Question 7An operations engineer is planning to start a container running a PostgreSQL database. Th…
