http://tiger506.blog.51cto.com/318536/400185/
http://lustlost.blog.51cto.com/2600869/943110
1.echo 1 > /proc/sys/net/ipv4/ip_forward
2.两个网卡,一个eth0接外网地址192.168.8.0/24,一个wlan0接内网地址192.168.1.0/24
3.是需要一条规则,还是两条iptables规则
//所有从内网192.168.1.0发送的包都转发到eth0上???
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.0/24(source address) -j MASQUERDE
//错误,eth0是外网地址192.168.8.0网段,自己转发给自己?显然不对
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.8.0/24 -j MASQUERDE
4.其他无线设备连接到wlan0,使用192.168.1.0/24网段上的ip地址上网。
iptables -t nat --list
浙公网安备 33010602011771号