net.ipv4.conf.all.secure_redirects选项在sysctl.conf中的正确安全设置是什么?这里设置为1,这里设置为0。net.ipv4.conf.default.secure_redirects与以前的相关吗?ٌ,它的正确设置是什么?
====
第一链接(wiki.ubuntu.com)指出:
撰写本文时,以下sysctl设置是默认设置。我们打算让他们保持这种状态。net.ipv4.conf.all.secure_redirects = 1.仅允许从路由表中已知的网关重定向,从而防止了路由路径的劫持。
第二链接(joshrendek.com)声明:
# Make sure no one can alter the routing tables
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0发布于 2014-04-17 08:25:33
在看这个时,我使用Fedora作为参考文献 (看看另一个操作系统是如何看待这个问题的)(编辑:这些是Fedora关于设置服务器的想法!)请参阅下面的部分,以了解为什么这很重要):

文档:
accept_redirects - BOOLEAN
Accept ICMP redirect messages.
accept_redirects for the interface will be enabled if:
- both conf/{all,interface}/accept_redirects are TRUE in the case
forwarding for the interface is enabled
or
- at least one of conf/{all,interface}/accept_redirects is TRUE in the
case forwarding for the interface is disabled
accept_redirects for the interface will be disabled otherwise
default TRUE (host)
FALSE (router)这里有一个有趣的博客。结论:
这种神秘的逻辑意味着对于非路由器(即大多数服务器)来说,
/proc/sys/net/ipv4/conf/all/accept_redirects不仅必须是0,/proc/sys/net/ipv4/conf/interface/accept_redirects也必须是0。
所以..。
两者都可以被认为是正确的(和理智的)。
https://askubuntu.com/questions/448900
复制相似问题