OpenWrt 桥接拨号后访问光猫

光猫(192.168.1.1)设置桥接之后使用路由器(192.168.10.1)进行拨号,通过路由器进行上网的设备就不能通过光猫的 IP 访问光猫后台了,可以进行下面的设置使接在路由器后的设备也能通过通过光猫的 IP 地址进行访问光猫后台。

创建一个新的 DHCP 接口,使用和光猫相连的接口(eth0),命名为 mowan 可以命名成其他任意的名字,在高级设置(Advanced Settings)中取消勾选使用默认网关(Use default gateway),在防火前设置中,创建/分配防火墙区域(Create / Assign firewall-zone)中选择 wan。对应的命令如下。

# /etc/config/firewall
uci del firewall.cfg03dc81.network
uci add_list firewall.cfg03dc81.network='wan'
uci add_list firewall.cfg03dc81.network='wan6'
uci add_list firewall.cfg03dc81.network='mowan'
# /etc/config/network
uci set network.mowan=interface
uci set network.mowan.proto='dhcp'
uci set network.mowan.device='eth0'
uci set network.mowan.defaultroute='0'

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>