首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >内核安全设置

内核安全设置
EN

Ask Ubuntu用户
提问于 2014-04-17 06:39:03
回答 1查看 1.5K关注 0票数 4

net.ipv4.conf.all.secure_redirects选项在sysctl.conf中的正确安全设置是什么?这里设置为1这里设置为0net.ipv4.conf.default.secure_redirects与以前的相关吗?ٌ,它的正确设置是什么?

====

第一链接(wiki.ubuntu.com)指出:

撰写本文时,以下sysctl设置是默认设置。我们打算让他们保持这种状态。net.ipv4.conf.all.secure_redirects = 1.仅允许从路由表中已知的网关重定向,从而防止了路由路径的劫持。

第二链接(joshrendek.com)声明:

代码语言:javascript
复制
# 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
EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2014-04-17 08:25:33

在看这个时,我使用Fedora作为参考文献 (看看另一个操作系统是如何看待这个问题的)(编辑:这些是Fedora关于设置服务器的想法!)请参阅下面的部分,以了解为什么这很重要):

文档

代码语言:javascript
复制
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。

所以..。

  • 如果将系统用作服务器,则将其设置为0。
  • 如果您使用您的系统作为桌面,您可以把它放在1(但可以设置为0,如果您想硬化您的系统)。

两者都可以被认为是正确的(和理智的)。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/448900

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档