简体   繁体   中英

How to disable FTP port (Debian)?

I am newbie in Debian. I have open FTP port (21) on Debian 6 (http server of the system is Nginx). How I can stop or disable the port via service or somehow yet? The command /etc/init.d/proftpd stop is not working, it shows in console bash: /etc/init.d/proftpd: No such file or directory because proftpd is absent.

Inputing this command netstat -tnlp , you can find which process is running on port 21.

Then you can some work by youself.

如果你懒得停止服务运行,你可以写一个 iptables 规则

sbin/iptables -A INPUT -p tcp --destination-port {PORT-NUMBER-HERE} -j DROP

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM