【发布时间】:2016-01-10 00:02:38
【问题描述】:
我是 Debian 的新手。我在 Debian 6 上打开了 FTP 端口(21)(系统的 http 服务器是 Nginx)。我如何通过服务或某种方式停止或禁用端口?命令/etc/init.d/proftpd stop 不起作用,它显示在控制台bash: /etc/init.d/proftpd: No such file or directory 因为proftpd 不存在。
【问题讨论】:
我是 Debian 的新手。我在 Debian 6 上打开了 FTP 端口(21)(系统的 http 服务器是 Nginx)。我如何通过服务或某种方式停止或禁用端口?命令/etc/init.d/proftpd stop 不起作用,它显示在控制台bash: /etc/init.d/proftpd: No such file or directory 因为proftpd 不存在。
【问题讨论】:
输入这个命令netstat -tnlp,可以查到哪个进程在21端口运行。
然后你可以自己做一些工作。
【讨论】:
如果你懒得停止服务运行,你可以编写一个 iptables 规则
sbin/iptables -A INPUT -p tcp --destination-port {PORT-NUMBER-HERE} -j DROP
【讨论】: