临时开启
[root@proxy ~]# echo 1 > /proc/sys/net/ipv4/ip_forward
永久开启
[root@proxy ~]# vim /etc/sysctl.conf net.ipv4.ip_forward = 1
修改网关
[root@web1 ~]# vim /etc/sysconfig/network-scripts/ifcfg-ethn GATEWAY=192.168.2.5
[root@web1 ~]# vim /etc/sysconfig/network
GATEWAY=192.168.2.5