Access Modem GUI from Router Network

swazz99jhb

Well-Known Member
Joined
Nov 20, 2005
Messages
229
Reaction score
6
Location
Johannesburg
Hi

I'm trying to access my Modem GUI from my Linksys Router network with no success.

Please assist. I've read about the option of running the cable from the WAN to LAN Port 1 and Modem then plugged into a LAN port 2, but someone said that is not only waisting ports but also a huge security risk?

I've tried the following but when I access 192.168.2.250 or 192.168.2.50 I go to the Linksys GUI.

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=427684
#Firewall Script:
iptables -t nat -I POSTROUTING -o `nvram get wan_ifname` -j MASQUERADE

#Startup Script:
ifconfig `nvram get wan_ifname`:0 192.168.2.50 netmask 255.255.0.0

as well as
http://www.dslreports.com/forum/r20459971-HOWTO-Connecting-to-modem-through-router
#Startup Script:
ifconfig vlan1 192.168.2.250

#Firewall Script:
iptables -A forwarding_rule -d 192.168.2.50 -j ACCEPT
iptables -t nat -A POSTROUTING -d 192.168.2.50 -j MASQUERADE

My Setup is as follow:
Huawei Modem: Bridged
IP: 192.168.2.50
Sub Net: 255.255.0.0

Linksys Router: WRT54-GL running DD-Wrt
IP: 192.168.2.1
Sub Net: 255.255.255.0



Thanks
 
Change the subnet of your modem to like:
IP address = 192.168.1.50
Subnet mask = 255.255.255.0

Your Linksys modem should then also have an IP address in that subnet on its LAN port. eg:
IP address = 192.168.1.100
Subnet mask = 255.255.255.0

By doing that, your Linksys router should automatically NAT (masquerade) the traffic going to the modem.
 
@Pada

Hey it didn't work.

Doesn't the modem being in bridged mode affect this. I don't really understand vlans, but isn't the eth0 and wlan0 on different vlans and thus restricting the access?

This how ever was successful:

http://www.dd-wrt.com/wiki/index.php/Access_To_Modem_Configurationhttp://

Chose 192.168.1.20 as my "new" gui IP.

Modem : 192.168.1.50
Subnet: 255.255.255.0

Router: 192.168.2.1
Subnet:255.255.255.0

ifconfig `nvram get wan_ifname`:0 192.168.1.20 netmask 255.255.255.0

I can now get to the GUI via 192.168.1.50

Thanks.
 
Last edited:
The LAN & WAN ports are usually in different VLAN's.
When you select to bridge them, they create a bridge interface that links the 2 VLAN's to each other.

VLAN's could be quite tricky. I've never had proper network training (besides like basic IPv4 & MikroTik courses), and I still struggle with VLAN's.

I forgot to tell you that you might need to add a static route on your modem for the 192.168.2.x subnet.
Seeing that your router's WAN IP is 192.168.1.20, the static route on the modem would be as follow:
IP address: 192.168.2.0
Subnet mask: 255.255.255.0
Gateway: 192.168.1.20

This way it won't be necessary for your Linksys router to NAT.

I'm running a Buffalo router (LAN @ 192.168.11.1, WAN @ 10.0.0.3) that is connected to a Telkom 5100 ADSL modem (bridged LAN @ 10.0.0.2) and I haven't even bridged anything, besides selecting PPPoE Relaying on my router ;)
If you're selecting a PPPoE account on the WAN interface on your Linksys router, then you'll have to run a startup script to add a WAN IP address in the 192.168.1.x subnet - or at least this was what I had to do when I dialed my PPPoE accounts from my router - which I saw you did too with
Code:
ifconfig `nvram get wan_ifname`:0 192.168.1.20 netmask 255.255.250
 
Top
Sign up to the MyBroadband newsletter
X