Which line in your /etc/hosts.allow will have the desired effect?

Your FTP server has been under attack, and the ISP of the attacker has been less than helpful in mitigating the attacks. So you decide that all connections from that ISP (badguy.example.org) to your FTP server will be denied and sent a message. Which line in your /etc/hosts.allow will have the desired effect?

Your FTP server has been under attack, and the ISP of the attacker has been less than helpful in mitigating the attacks. So you decide that all connections from that ISP (badguy.example.org) to your FTP server will be denied and sent a message. Which line in your /etc/hosts.allow will have the desired effect?

A.
in.ftpd : .badguy.example.org : twist echo "450 denied due to numerous attacks from this domain"

B.
ftp : badguy.example.org : DENIED message "450 denied due to numerous attacks from this domain"

C.
in.ftpd : badguy.example.org : spawn "echo 450 denied due to numerous attacks from this domain"

D.
ftp : .badguy.example.org : DENIED due to numerous attacks from this domain

Explanation/Reference:
twist replaces the requested service with the specified command. It can be used to send messages to connecting clients. The twist command must occur at the end of the rule line.

In the following example, clients attempting to access FTP services from the example.com domain are sent a message via the echo command:
vsftpd : .example.com : twist /bin/echo "421 Bad hacker, go away!"



Leave a Reply 0

Your email address will not be published. Required fields are marked *