根据https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
conf/all/* is special, changes the settings for all interfaces
Run Code Online (Sandbox Code Playgroud)
forwarding - BOOLEAN
Enable IP forwarding on this interface. This controls whether packets
received _on_ this interface can be forwarded.
Run Code Online (Sandbox Code Playgroud)
ip_forward - BOOLEAN
0 - disabled (default)
not 0 - enabled
Forward Packets between interfaces.
This variable is special, its change resets all configuration
parameters to their default state (RFC1122 for hosts, RFC1812
for routers)
Run Code Online (Sandbox Code Playgroud)
因此,net.ipv4.conf.all.forwarding=0禁用所有接口上的 IPv4 数据包转发,与net.ipv4.ip_forward=0禁用所有接口上的 IPv4 数据包转发,与禁用所有接口上的 IPv4 数据包转发
net.ipv4.conf.all.forwarding任何人都可以解释一下内核参数和内核参数之间的区别吗net.ipv4.ip_forward …