内网机器需要更新下载软件时,用内网可上网机器作nat连接外网
网关 外网网卡ip:61.88.54.23 网关:61.88.54.1 内网网卡ip:192.168.0.39 网关:无
客户机 内网网卡ip:192.168.0.40
内网网卡接在同一交换机上
1.网关机 #打开内核的包转发功能 echo 1 > /proc/sys/net/ipv4/ip_forward #建立IP转发和映射
2.客户机 先加个corn 15点40自动清除,防止操作失败 crontab -e
3.添加路由 route add default gw 192.168.0.39
4.测试外网连接 ping 8.8.8.8
5.开机运行 vi /etc/rc.local
6.清除crontab
No Responses (yet)
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.