电信基线扫描以及漏洞处理

一.基线扫描问题:

1.检查PermitRootLogin配置:

解决办法,在服务器上新添加一个账号密码,把新添加的账号设置为root权限,检查能登陆配置PermitRootLogin no

参考:https://blog.51cto.com/lookingdream/1841070

配置完成 需要重启才能生效

2.检查limit_conn设置
 检查limit_rate设置
配置错误页面

1.在http include 之前

    limit_conn_zone $binary_remote_addr zone=perip:10m;
    #gzip  on;
    fastcgi_intercept_errors on;
    server {
        error_page 400 /404.html;
        error_page 404 /404.html;
        error_page 413 /404.html;
        error_page 502 /404.html;
        error_page 504 /404.html;
        location = /404.html {
            root /usr/local/apollo/nginx/html;
        }
    }

2.在server中添加

    limit_conn perip 1000;
    limit_rate 500m;

二、漏洞问题:

1.ICMP timestamp请求响应漏洞

描述:
远程主机会回复ICMP_TIMESTAMP查询并返回它们系统的当前时间。 这可能允许者一些基于时间认证的协议

修复:
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type timestamp-request -m comment --comment "deny ICMP timestamp" -j DROP
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type timestamp-reply -m comment --comment "deny ICMP timestamp" -j DROP


修改完记得reload下
firewall-cmd --reload

查看添加的规则
firewall-cmd --direct --get-all-rules

可以参考:https://blog.csdn.net/Doudou_Mylove/article/details/115392827

2.服务器安装snmp

1>. 下载安装包:https://centos.pkgs.org/

2>. 下载的4个net-snmp版本需要一致

rpm -ivh net-snmp*.rpm --force   安装

 参考地址:https://blog.csdn.net/zhuimeng_by/article/details/91884175

3>. 防火墙:

firewall-cmd --add-port=161/udp --permanent

 firewall-cmd --reload

可以参照:
https://jingyan.baidu.com/article/e73e26c0665abe24adb6a7eb.html

原文地址:https://www.cnblogs.com/moon-yyl/p/15098138.html