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 tcpand 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 220.127.116.11. 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
host, because they ignore /etc/hosts.