centos解决ICMP漏洞与Traceroute探测漏洞

centos解决ICMP漏洞与Traceroute探测漏洞linux-centos解决ICMP漏洞与Traceroute探测漏洞

漏洞如下

在这里插入图片描述

1、ICMP漏洞修复

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

2、允许Traceroute探测 漏洞修复

firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type 11 -m comment --comment "deny traceroute" -j DROP

防火墙命令生效

firewall-cmd --reload

查看添加的规则

firewall-cmd --direct --get-all-rules

iptables修复

sudo iptables -A INPUT -p ICMP --icmp-type timestamp-request -j DROP
sudo iptables -A INPUT -p ICMP --icmp-type timestamp-reply -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
 
systemctl enable iptables.service

执行以上如提示:Failed to execute operation: No such file or directory
需执行:yum install iptables-services

移除添加的规则

firewall-cmd --permanent --direct --remove-rule ipv4 filter INPUT 0 -p ICMP --icmp-type timestamp-request -m comment --comment "deny ICMP timestamp" -j DROP
firewall-cmd --permanent --direct --remove-rule ipv4 filter INPUT 0 -p ICMP --icmp-type 11 -m comment --comment "deny traceroute" -j DROP

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/34975.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注