Fork me on GitHub

允许Traceroute探测 (在防火墙中禁用Time Exceeded类型的ICMP包)

允许Traceroute探测 (在防火墙中禁用Time Exceeded类型的ICMP包)


 

 允许Traceroute探测
详细描述 本插件使用Traceroute探测来获取扫描器与远程主机之间的路由信息。攻击者也可以利用这些信息来了解目标网络的网络拓扑。
解决办法 在防火墙中禁用Time Exceeded类型的ICMP包
威胁分值 1.0
危险插件
发现日期 1999-01-01

 

解决步骤如下:

(说明:如果 /etc/sysconfig/ 目录下没有 iptables 文件,需要安装 iptables,请参考:https://www.cnblogs.com/miracle-luna/p/13714709.html

 

1、修改 iptables 文件

/etc/sysconfig/iptables 文件中,增加如下内容:

-A INPUT -p icmp --icmp-type time-exceeded -j DROP
-A OUTPUT -p icmp --icmp-type time-exceeded -j DROP

 

修改后,iptables 文件内容如下:

复制代码
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]

-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT

# 解决time exceeded问题
-A INPUT -p icmp --icmp-type time-exceeded -j DROP
-A OUTPUT -p icmp --icmp-type time-exceeded -j DROP

-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
复制代码

 

2、保存 iptables 文件

service iptables save

 

3、重载 iptables 文件

systemctl reload iptables

或者 

service iptables reload

 

4、重启 iptables 服务

systemctl restart iptables

或者

service iptables restart

 

5、查看 iptables 状态

systemctl status iptables

或者

service iptables status

 

posted @   龙凌云端  阅读(17987)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示