开发者社区 问答 正文

对Linux服务器进行性能优化,请问在网络方面如何关闭路由相关功能呢?

对Linux服务器进行性能优化,请问在网络方面如何关闭路由相关功能呢?

展开
收起
我是小美女 2021-11-04 13:28:43 408 分享 版权
1 条回答
写回答
取消 提交回答
  • 网络规划设计师、敏捷专家、CISP、ITSS服务经理、ACA全科目、ACP4项、ACE、CBP、CDSP、CZTP等。拥有 PRINCE2 Foundation/Practitioner、CCSK、ITIL、ISO27001、PMP等多项国际认证。 专利5+、期刊10+、知识产权师。核心期刊审稿人。

    您好,参考配置如下:

    net.ipv4.conf.lo.accept_source_route=0
    net.ipv4.conf.all.accept_source_route=0
    net.ipv4.conf.eth0.accept_source_route=0
    net.ipv4.conf.default.accept_source_route=0
    
    net.ipv4.conf.lo.accept_redirects=0
    net.ipv4.conf.all.accept_redirects=0
    net.ipv4.conf.eth0.accept_redirects=0
    net.ipv4.conf.default.accept_redirects=0
    
    net.ipv4.conf.lo.secure_redirects=0
    net.ipv4.conf.all.secure_redirects=0
    net.ipv4.conf.eth0.secure_redirects=0
    net.ipv4.conf.default.secure_redirects=0
    
    net.ipv4.conf.lo.send_redirects=0
    net.ipv4.conf.all.send_redirects=0
    net.ipv4.conf.eth0.send_redirects=0
    net.ipv4.conf.default.send_redirects=0
    
    
    2021-11-04 13:33:24
    赞同 1 展开评论