找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1982|回复: 2

padavan固件lan口路由没有nat的问题

[复制链接]
发表于 2018-6-8 19:39 | 显示全部楼层 |阅读模式
在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]#






我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2018-6-8 23:32 | 显示全部楼层
加了条命令解决了,iptables -t nat -A POSTROUTING -s 192.168.99.0/24 -o apclii0 -j MASQUERADE,但是希望固件能在lan的路由设置中,可设置内网的网段,这样方便

点评

改LAN子网掩码为255.255.0.0  详情 回复 发表于 2018-6-9 11:21
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-6-9 11:21 | 显示全部楼层
lixirong 发表于 2018-6-8 23:32
加了条命令解决了,iptables -t nat -A POSTROUTING -s 192.168.99.0/24 -o apclii0 -j MASQUERADE,但是希 ...

改LAN子网掩码为255.255.0.0
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-26 04:40

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表