-A POSTROUTING -s 192.168.4.0/255.255.255.0 -j SNAT --to-source 20.20.20.2
-A POSTROUTING -s 192.168.3.0/255.255.255.0 -j SNAT --to-source 10.10.10.2
-A POSTROUTING -s 192.168.2.0/255.255.255.0 -j SNAT --to-source 58.246.139.66
-A POSTROUTING -s 192.168.1.0/255.255.255.0 -j SNAT --to-source 58.246.139.66
-A POSTROUTING -s 192.168.6.0/255.255.255.0 -j SNAT --to-source 30.30.30.3
30.30.30.3和20.20.20.2是2连接外网的同品牌路由
如上:
4.0通 6.0不通 (路由和外网都没问题 ifconfig如下:
eth0 Link encap:Ethernet HWaddr 00:16:17:21:8C:ED
inet addr:20.20.20.2 Bcast:20.20.20.255 Mask:255.255.255.0
inet6 addr: fe80::216:17ff:fe21:8ced/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4351427 errors:0 dropped:0 overruns:0 frame:0
TX packets:3315556 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:787716699 (751.2 MiB) TX bytes:561804147 (535.7 MiB)
Interrupt:169
eth0:0 Link encap:Ethernet HWaddr 00:16:17:21:8C:ED
inet addr:10.10.10.2 Bcast:10.10.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:169
eth0:1 Link encap:Ethernet HWaddr 00:16:17:21:8C:ED
inet addr:58.246.139.66 Bcast:58.246.139.71 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:169
eth0:2 Link encap:Ethernet HWaddr 00:16:17:21:8C:ED
inet addr:58.246.139.70 Bcast:58.246.139.71 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:169
eth0:3 Link encap:Ethernet HWaddr 00:16:17:21:8C:ED
inet addr:30.30.30.3 Bcast:30.30.30.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:169
新人极菜 求各位援手
willionmax 于 2011-06-16 17:12:09发表:
用forward 然后就是 应该不是用SNAT
willionmax 于 2011-06-16 17:11:55发表:
用forward 然后就是 应该不是用SNAT