Openwrt网段:192.168.1.1/24
Modem网段: 192.168.0.1/24
Openwrt下配置和Modem相连接端口IP:
#https://www.haiyun.me
ifconfig eth1.1 192.168.0.2 netmask 255.255.255.0
Iptables配置SNAT:
iptables -t nat -A POSTROUTING -d 192.168.0.1 -j MASQUERADE
iptables放行:
iptables -A INPUT -i eth1.1 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth1.1 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
tracert测试:
C:\Users\Administrator>tracert 192.168.0.1
通过最多 30 个跃点跟踪到 192.168.0.1 的路由
1 1 ms 1 ms 1 ms OpenWrt.lan [192.168.1.1]
2 1006 ms 2723 ms 2 ms 192.168.0.1
跟踪完成。
标签:openwrt, web, modem, openwrt路由下打开modem管理界面