调度数据网反馈后台主机开放非法端口有21 23 80 111 139 445 631
其中大部分为危险端口,不可以加入到白名单端口中,需在后台机中关闭。
关闭方法如下:
关闭21端口
vi /etc/inetd.conf
注释行#telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
/etc/init.d/openbsd-inetd restart
关闭22端口
/etc/init.d/ssh stop
chkconfig ssh off
关闭23端口
/etc/init.d/proftpd stop
chkconfig proftpd off
关闭80端口
/etc/init.d/apache2 stop
chkconfig apache2 off
关闭111端口
/etc/init.d/rpcbind stop
chkconfig rpcbind off
关闭631端口
/etc/init.d/cups stop
chkconfig cups off
关闭8080端口
/etc/init.d/tomcat7 stop
chkconfig tomcat7 off
关闭139和445端口
/etc/init.d/samba stop
chkconfig samba off
如需自动的加固脚本,请查看博主的上传资源。