Or just add the client's address and hostname to /etc/hosts.A workaround might be to reject that particular DNS request in your firewall or packet filter, so it returns an error right away, without having to wait for the timeout.
I have add my client ip address to hosts, but it doesn't work.Or just add the client's address and hostname to /etc/hosts.
You need to add the connecting machine’s IP address (not your own), because that’s the address that ftpd(8) is trying to resolve.I have add my client ip address to hosts, but it doesn't work.![]()
netstat -Sp tcp
and look for lines containing an “ftp” port. The remote host's IP address (plus its port, which need not be ftp) can be found in the “Foreign Address” column. getent hosts <IP_address>
, for example getent hosts 1.2.3.4
. Technically it does the same thing as other programs like ftpd(8), so it’s useful for testing. Do not use specialized DNS tools for that purpose, like nslookup
, dig
or host
, because they ignore /etc/hosts.