linux下使用iptables做路由器NAT上网
八月 29th, 2009 Posted in Iptables | 阅读次数: 711 次
制作:高进波
时间:2009-8-28
主题:linux下使用iptables做路由器NAT上网
环境:
server
eth0 202.45.2.33 (外网)
eth1 192.168.1.1 (内网)
client
eth0 192.168.1.10 (内网)
一.服务器配置
1.开启IP转发
echo “1″>/proc/sys/net/ipv4/ip_forward
2.设置iptables规则
iptables -t nat -A POSTROUTING -j MASQUERADE
二.客户端设置
将缺省网关设置为192.168.1.1
完成
十一月 9th, 2009 at 11:33
请问这个还能进行帐户管理和流速控制吗?
谢谢。
十一月 9th, 2009 at 11:54
可以配合使用iptables对流量进行控制,但效果不好!
二月 2nd, 2010 at 10:28
很有用,初学者的信心啊!谢谢。
六月 17th, 2011 at 05:04
Related Websites…
[...]here are some other links to sites that we find everyday so here are some popular sites we like today[...]…