临时生效:
echo "1" > /proc/sys/net/ipv4/ip_forward
永久生效,需要修改sysctl.conf:
net.ipv4.ip_forward = 1
执行sysctl -p马上生效