加入收藏 | 设为首页 | 会员中心 | 我要投稿 PHP编程网 - 黄冈站长网 (http://www.0713zz.com/)- 数据应用、建站、人体识别、智能机器人、语音技术!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

linux – 关闭/打开不可访问消息的原因?

发布时间:2021-03-05 21:05:41 所属栏目:Linux 来源:网络整理
导读:我在这个问题( How can I stop Linux from sending ICMP “Destination Unreachable” responses?)上看到,有很多讨论指出你不应该关闭ICMP无法访问的消息.我想知道为什么以及何时应该?我也想知道怎么做.我知道它打破了MTU路径发现,但还有什么? 在cisco设

我在这个问题( How can I stop Linux from sending ICMP “Destination Unreachable” responses?)上看到,有很多讨论指出你不应该关闭ICMP无法访问的消息.我想知道为什么以及何时应该?我也想知道怎么做.我知道它打破了MTU路径发现,但还有什么?

在cisco设备上你可以打开和关闭它,必须有一个原因.在他们的文档中,它只是说关闭它应该是为了提高安全性,因为它更难获取有关您的网络的信息?这就是cisco文档所说的内容.我需要实现在我公司的交换机上打开和关闭此功能的能力,以便我了解它.无论为什么我仍然必须这样做,但我想知道为什么要这样做或不给他人一个明智的答案.

当我想关闭ICMP重定向时,我这样做:

echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects

不可达的东西有类似的东西吗?

另一个线程上的用户这样做:

iptables -A OUTPUT -p icmp --icmp-type destination-unreachable -j DROP

这是一个好方法,然后我可以通过停止这种下降再次打开它?

我应该告诉别人他们不需要这个功能吗?

编辑:
在线我看到了这个:

An attacker could gather information’s about your network when scanning it,like unused IP’s and networks. When working with (interface-) Access-Lists,a deny statement triggers an ICMP Type 3     Code 9/10 message
(Network/Host is Administratively Prohibited). When disabling ICMP    unreachables 
on the interface where the ACL is applied,the deny statement 
acts like a ‘drop’ and does not reply.

解决方法

从 security.SE关于同一主题的非常详尽和精心编写的 answer,我强烈建议您阅读:

At its core ICMP was designed as the debugging,troubleshooting,and
error reporting mechanism for IP. This makes it insanely valuable so a
lot of thought needs to into shutting it down. It would be a bit like
tacking >/dev/null 2>&1 to the end of all your cron entries.

Source Quench / Redirect几乎已过时,已从现代网络设备中删除. IPv6要求ICMP完全运行.

底线:除非你完全理解其含义,否则不要阻止任何事情.如果我给你一个建议,那就是阻止你的外部防火墙中的icmp echo,并让其他所有内容保持打开状态.但这只是我的观点.

(编辑:PHP编程网 - 黄冈站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读