首先需要进行linux的基础安全设置
1、Linux系统脚本
上述文件下载到机器内部直接执行即可。
2、设置iptables,限制访问
以上脚本,在每次重装完系统后执行一次即可,其配置会保存至/etc/sysconfig/iptables
3、常用网络监控命令
(1) netstat -tunl:查看所有正在监听的端口
其中123端口用于NTP服务。
(2)netstat -tunp:查看所有已连接的网络连接状态,并显示其PID及程序名称。
根据上述结果,可以根据需要kill掉相应进程。
如:
kill -9 1003
(3)netstat -tunlp
(4)netstat常用选项说明:
-t: tcp
-u : udp
-l, –listening
Show only listening sockets. (These are omitted by default.)
-p, –program
Show the PID and name of the program to which each socket belongs.
–numeric , -n
Show numerical addresses instead of trying to determine symbolic host, port or user names.
4、修改ssh的监听端口
(1)修改 /etc/ssh/sshd_config
原有的port 22
改为port 44
(2)重启服务
/etc/init.d/sshd restart
(3)查看情况










