服务器安全运维 网络安全运维 数据安全运维 1、账号安全 删除特殊的用户和组:adm,lp,sync,shutdown,halt,news,uucp,operator,games,gopher adm,lp,news,uucp,games,dip,pppusers,popusers,slipusers userdel x groupdel x usermod -s /sbin/nologin nagios 2、关闭不需要的服务 anacron,auditd,autofs,
image.png
chkconfig --level 345 bluetooth off 需要开启的服务: acpid,apmd,kudzu,crond,atd,keytables,iptables,xinetd,xfs,network,sshd,syslog 3、密码安全策略(堡垒机替代) 秘钥认证 密码认证 vi /etc/ssh/sshd_config
image.png
4、su sudo
image.png
xx ALL = NOPASSWD: /etc/init.d/nagios restart
user02 ALL=(ALL) NOPASSWD: ALL 5、删减登陆信息 6、禁用 alt+control+delete 7、SSH配置修改 更改默认端口 使用协议2 Protocol 2 ListenAddress 0.0.0.0 + allow deny PermitRootLogin no MaxAuthTries 3 AllowUsers x y AllowGroups x y DenyUsers DenyGroups x 8、记录详细指令历史:bashrc
image.png
image.png
image.png
image.png
9、tcp_wrappers /etc/hosts.allow /etc/hosts.deny sshd,portmap,sendmail,xinetd,vsftpd,tcpd sshd:xxx sshd:ip
image.png
sshd:ALL
image.png
10 文件系统安全
chattr +i xxx
image.png
image.png
11 文件权限检查和修改
image.png
image.png
12 定期升级软件 yum check-update 13 每天定时执行rootkit检查 使用RKHunter
image.png
14 服务器遭受攻击后处理方法
切断网络
查找攻击源
分析入侵原因
备份数据
修复漏洞
恢复连接
15、网络安全
NTOP检测网络
iperf检查网络性能
nmap端口扫描