9394952

导航

debian下NAT的设置

 1、打开ip_foward功能:

vi /etc/sysctl.conf,加入net.ipv4.ip_forward = 1,

2、reboot

3、打开iptables的策略

iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -o eth0 -j MASQUERADE

此行可以放在/etc/rc.d/rc.local里启动执行

4、OK大功告成

posted on 2008-04-03 22:33  9394952  阅读(404)  评论(0编辑  收藏  举报