Translated message

A translation of this page exists in English.

Red Hat Enterprise Linux の起動時に 'ip_forward' がデフォルトで有効になっているのはなぜですか?

Solution Verified - Updated -

Issue

  • 起動時に、/proc/sys/net/ipv4/ip_forward および sysctl net.ipv4.ip_forward の出力で ip_forward が有効になっていると表示されます。

    $ cat /proc/sys/net/ipv4/ip_forward 
    1
    $ sysctl net.ipv4.ip_forward
    net.ipv4.ip_forward = 1
    
    • ただし、/etc/sysctl.conf のパラメーターでは、デフォルトで無効になっています。

      $ grep ip_forward /etc/sysctl.conf 
      net.ipv4.ip_forward = 0
      
  • カーネルパラメーター net.ipv4.ip_forward = 0 を永続的に無効にできないのはなぜですか?

  • /etc/sysctl.confnet.ipv4.ip_forward = 0 と設定されていても、再起動後に IP 転送が無効になりません。

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content