一、ICMP timestamp请求响应漏洞处理(CVE-1999-0524)

临时解决:
执行后立即生效,但是无法保存,重启就会失效。
sudo iptables -A INPUT -p ICMP --icmp-type timestamp-request -j DROP
sudo iptables -A INPUT -p ICMP --icmp-type timestamp-reply -j DROP
永久解决:
编辑 vi /etc/sysconfig/iptables
-A INPUT -p icmp -m icmp --icmp-type timestamp-request -j DROP
-A OUTPUT -p icmp -m icmp --icmp-type timestamp-reply -j DROP

或者
iptables -A INPUT -p ICMP --icmp-type timestamp-request -j DROP
iptables -A OUTPUT -p ICMP --icmp-type timestamp-reply -j DROP
输入完成,保存修改后的规则:
service iptables save或者iptables-save

二、允许Traceroute探测

临时解决:
执行后立即生效,但是无法保存,重启就会失效。
sudo iptables -A INPUT -p ICMP --icmp-type time-exceeded -j DROP
sudo iptables -A OUTPUT -p ICMP --icmp-type time-exceeded -j DROP 
永久解决:
编辑etc/sysconfig/iptables文件,在防火墙规则里面添加如下记录:
-A INPUT -p icmp -m icmp --icmp-type time-exceeded -j DROP
-A OUTPUT -p icmp -m icmp --icmp-type time-exceeded -j DROP

或在终端命令行输入以下命令:
sudo iptables -A INPUT -p ICMP --icmp-type time-exceeded -j DROP
sudo iptables -A OUTPUT -p ICMP --icmp-type time-exceeded -j DROP
输入完成,保存修改后的规则:iptables-save或者service iptables save
重启服务 service iptables restart
如有还原之前的配置的需求:iptables-restore

三、OpenSSH CBC模式 弱加密算法漏洞(CVE-2008-5161)

第一种:直接升级openssh最新版
https://blog.csdn.net/qq_42430287/article/details/125539316
第二种:
[root@localhost ~]# echo 'Ciphers aes128-ctr,aes192-ctr,aes256-ctr' >> /etc/ssh/sshd_config 
[root@localhost ~]# systemctl restart sshd

四、iptables开启端口

1、开启iptables端口
开启514端口
iptables -A INPUT -p tcp --dport 514 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 514 -j ACCEPT

2、保存iptables设置,重启iptables
在更改完设置后要先保存设置:
service iptables save
然后再重启iptables才能使设置生效:
service iptables restart

3、看端口
输入命令查看已开端口:
iptables -L -n
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐