XK0-004 · Question #74
An administrator is attempting to block SSH connections to 192.168.10.24 using the Linux firewall. After implementing a rule, a connection refused error is displayed when attempting to SSH to…
The correct answer is A. iptables -A -p tcp -d 192.168.10.24 -dropt 22 -j REJECT. "reject" uses the REJECT iptables target, which sends back an error packet to the sender of the rejected packet. From the ufw manual page: Sometimes it is desirable to let the sender know when traffic is being denied, rather than simply ignoring it. In these cases, use reject…
Question
An administrator is attempting to block SSH connections to 192.168.10.24 using the Linux firewall. After implementing a rule, a connection refused error is displayed when attempting to SSH to 192.168.10.24. Which of the following rules was MOST likely implemented?
Options
- Aiptables -A -p tcp -d 192.168.10.24 -dropt 22 -j REJECT
- Biptables -A -p tcp -d 192.168.10.24 -dropt 22 -j DROP
- Diptables -A -p tcp -d 192.168.10.24 -dropt 22 -j REFUSE
How the community answered
(30 responses)- A83% (25)
- B3% (1)
- D13% (4)
Explanation
"reject" uses the REJECT iptables target, which sends back an error packet to the sender of the rejected packet. From the ufw manual page: Sometimes it is desirable to let the sender know when traffic is being denied, rather than simply ignoring it. In these cases, use reject instead of Drop - the dropped package is not matched against any further chain. When Linux iptables drop an incoming connection to your server, the person trying to connect does not receive an error. It appears as if they are trying to connect to a non-existing machine.
Topics
Community Discussion
No community discussion yet for this question.