Below is a UCI config file and a init script. With this you can access the modem GUI connected on the WAN port of the router.
However the stop_service() function does not work for me, I can still reach the modem GUI. If you now how to fix this let me know...
/etc/config/modemroute
config modemroute
option modem_ip '192.168.100.1'
/etc/init.d/modemroute
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
START=52
include /lib/network
scan_interfaces
config_get wan_ifname wan ifname
config_get lan_ipaddr lan ipaddr
config_get lan_netmask lan netmask
start_service() {
local section "$1"
config_get modem_ip "$section" modem_ip
ifconfig $wan_ifname:1 $lan_ipaddr netmask $lan_netmask
route add -host $modem_ip dev "$wan_ifname:1"
}
stop_service() {
local section "$1"
config_get modem_ip "$section" modem_ip
route del -host $modem_ip
ifconfig "$wan_ifname:1" down
}
start() {
config_load modemroute
config_foreach start_service modemroute
}
stop() {
config_load modemroute
config_foreach stop_service modemroute
}
(Last edited by forum2006 on 14 Nov 2007, 12:29)