當發現登入 vsftpd 很慢,但登入後便會十分暢順,這個問題很機會是 vsftpd 開啟了反解查詢登入的 IP 所致。以下是 vsftpd 關於反解的說明:
|
1 2 3 4 5 |
reverse_lookup_enable Set to YES if you want vsftpd to transform the ip address into the hostname, before pam authentication. This is useful if you use pam_access including the hostname. If you want vsftpd to run on the environment where the reverse lookup for some hostname is available and the name server doesn’t respond for a while, you should set this to NO to avoid a performance issue. Default: YES |
要解決這個問題,只需關閉 vsftpd 的 reverse_lookup_enable 即可,而這個選項預設值是開啟,即 YES 的狀態。
先開啟 vsftpd 的設定檔:
# vi /etc/vsftpd/vsftpd.conf
找到 “reverse_lookup_enable” 一行,如果沒有這一行需要自行加入,設定成 NO:
reverse_lookup_enable=NO
儲存後重新啟動 vsftpd:
# systemctl restart vsftpd