请遵守国家网络安全法
一:系统配置检查及软件安全软件部署
- /etc/pam.d/system-auth
auth required pam_tally2.so deny=5 unlock_time=300 even_deny_root root_unlock_time=10
password requisite pam_cracklib.so try_first_pass retry=3 dcredit=-4 lcredit=-1 ucredit=-2 ocredit=-1 minlen=8
2./etc/sysconfig/iptables
3./etc/ssh/sshd_config
PasswordAuthentication yes ##yes要改成no
ClientAliveInterval 30 #client 每隔60秒给客户端发送一次保活信息包给客户端
ClientAliveCountMax 300 # client 端发出的请求服务端没有回应的次数达到300次的时候就断开连接
4./etc/profile
umask 022
TMOUT 300 #用户超时注销
5./etc/login.defs 设置口令最小长度和最短使用时间
PASS_MAX_DAYS 180
PASS_MIN_DAYS 1
PASS_MIN_LEN 8
PASS_WARN_AGE 28
6.允许和禁止远程访问
6.1 hosts.allow:
sshd:210.13.218.:allow
sshd:222.77.15.:allow
6.2 hosts.deny
sshd:all:deny
6.3 service xinetd restart 重启生效
7./etc/selinux/config
disabled: