Linux中 ICMP相关漏洞处理 --Traceroute探测和ICMP timestamp请求响应漏洞 iptables命令

漏洞名称 建议解决办法
Traceroute探测漏洞 在防火墙出站规则中禁用echo-reply(type 0)、time-exceeded(type 11)、destination-unreachable(type 3)类型的ICMP包。
ICMP timestamp请求响应漏洞 * 在您的防火墙上过滤外来的ICMP timestamp(类型 13)报文以及外出的ICMP timestamp回复报文。

Traceroute探测漏洞

traceroute(udp+icmp)&tracert(icmp)原理 相关文章链接
在Linux防火墙上过滤外来的ICMP timestamp和禁止Traceroute探测

traceroute原理

\6. 直至目标地址收到探测数据包,并返回端口不可达通知(ICMP Port Unreachable)

tracert原理

\6. 直至目标地址收到探测数据包,并返回ICMP回应答复(ICMPEcho Reply);

icmp报文类型:

centos7需要单独安装iptables、且iptables与firewalld不能同时设置为开机启动

【Linux】执行 service iptables save 命令异常解决

【130】Linux 中防火墙firewalld和iptables的启动与关闭

iptables规则设置

iptables  -I OUTPUT         -p icmp     --icmp-type 0    -j DROP
#         -I 插入于最顶端     -p 协议                       -j 动作
#         -A 追加于最底端
iptables  -I OUTPUT         -p icmp     --icmp-type 3    -j DROP
iptables  -I OUTPUT         -p icmp     --icmp-type 11   -j DROP

ICMP timestamp请求响应漏洞

iptables规则设置

iptables  -I INPUT -p icmp --icmp-type 13 -j DROP
iptables  -I OUTPUT -p icmp --icmp-type 13 -j DROP
iptables  -I INPUT -p icmp --icmp-type 14 -j DROP
iptables  -I OUTPUT -p icmp --icmp-type 14 -j DROP
posted @ 2022-05-10 20:08  yy9knsg  阅读(2878)  评论(0编辑  收藏  举报