启用IP路由转发:修订间差异

来自三线的随记
(创建页面,内容为“== enable ipv4.ip_forward == === 临时 === echo 1 > /proc/sys/net/ipv4/ip_forward sysctl -w net.ipv4.ip_forward=1 === 永久 === /etc/sysctl.conf --->  net.ipv4…”)
 
无编辑摘要
第1行: 第1行:
== enable ipv4.ip_forward ==
==enable ipv4.ip_forward==


=== 临时 ===
=== Related knowledge points ===
echo 1 > /proc/sys/net/ipv4/ip_forward
sysctl: configure kernel parameters at runtime


sysctl -w net.ipv4.ip_forward=1
===临时设置===
 
echo 1 > /proc/sys/net/ipv4/ip_forward
=== 永久 ===
or
/etc/sysctl.conf --->  net.ipv4.ip_forward=1
sysctl -w net.ipv4.ip_forward=1
 
sysctl -p /etc/sysctl.conf


===永久设置===
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
不重启生效配置
sysctl -p /etc/sysctl.conf
[[分类:Linux]]
[[分类:Linux]]

2020年12月13日 (日) 02:36的版本

enable ipv4.ip_forward

Related knowledge points

sysctl: configure kernel parameters at runtime

临时设置

echo 1 > /proc/sys/net/ipv4/ip_forward

or

sysctl -w net.ipv4.ip_forward=1

永久设置

echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf

不重启生效配置

sysctl -p /etc/sysctl.conf