参考博客-Firewalld:允许Traceroute探测漏洞解决方法
参考博客-iptables:允许Traceroute探测
漏洞解决
关闭Traceroute探测的方法
Firewalld防火墙
firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -p ICMP --icmp-type 0 -m comment --comment "deny traceroute" -j DROP
|
firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -p ICMP --icmp-type 3 -m comment --comment "deny traceroute" -j DROP
|
firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -p ICMP --icmp-type 11 -m comment --comment "deny traceroute" -j DROP
|
防火墙重新载入
查看防火墙规则
firewall-cmd --direct --get-all-rules
|
Iptables
添加防火墙规则
重启失效
iptables -A INPUT -p ICMP --icmp-type time-exceeded -j DROP
|
iptables -A OUTPUT -p ICMP --icmp-type time-exceeded -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
|
重启防火墙
检查新添加的规则是否有效