|
在lan里设置了静态路由,但是路由的ip段并没有加入snat的问题,路由表如下:
0;RT-AC54U: /home/root[RT-AC54U /home/root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.1 0.0.0.0 UG 1 0 0 apclii0
10.8.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
192.168.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 apclii0
192.168.99.0 192.168.123.254 255.255.255.0 UG 2 0 0 br0
192.168.123.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
0;RT-AC54U: /home/root[RT-AC54U /home/root]#
但是nat表中没有加入:192.168.99.0的snat段:
nat表如下:
0;RT-AC54U: /home/root[RT-AC54U /home/root]# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
vserver all -- anywhere 192.168.2.102
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT all -- 192.168.123.0/24 anywhere to:192.168.2.102
MASQUERADE all -- 192.168.123.0/24 anywhere
SNAT all -- 192.168.123.0/24 192.168.123.0/24 to:192.168.123.1
Chain upnp (1 references)
target prot opt source destination
Chain upnp-post (0 references)
target prot opt source destination
Chain vserver (1 references)
target prot opt source destination
upnp all -- anywhere anywhere
0;RT-AC54U: /home/root[RT-AC54U /home/root]#
|
|