VPS如何关闭25端口

首先,查看端口占用:
netstat -ntl如果显示“netstat: command not found”
可先执行
yum install net-tools再执行上面的命令
发现 25 端口在开启中:

VPS如何关闭25端口


接下来,执行关闭 25 端口:
systemctl stop postfix.service或者
/etc/init.d/sendmail stop然后重新查看端口占用:
netstat -ntl发现 25 端口已经关闭了 。
【VPS如何关闭25端口】 

    推荐阅读