Access Modem WEB-GUI behind DD-WRT router???

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
Vaako
DD-WRT User


Joined: 10 Jun 2009
Posts: 370

PostPosted: Tue Dec 07, 2010 19:19    Post subject: Access Modem WEB-GUI behind DD-WRT router??? Reply with quote
Hello,

How can i access my modem IP ?

Router = 192.168.1.1
Modem = 192.168.2.254

The wiki tutorial does not work for me:
http://www.dd-wrt.com/wiki/index.php/Access_To_Modem_Configuration

Code:
Startup:
ifconfig `nvram get wan_ifname`:0 192.168.2.254 netmask 255.255.255.0

Code:
Firewall:
iptables -t nat -I POSTROUTING -o `nvram get wan_ifname` -j MASQUERADE

I have search here over and over and i cant find any people who have success accessed their modem via DD-WRT.

Please post your findings here!!!

Thanks in advance!

_________________
Regards,
Vaako

1x Netgear R7800 Nighthawk - firmware not decided yet !!!!
1x Netgear R7000 Nighthawk r36410
1x Ubiquiti RouterStation Pro DD-WRT r23204 std (12/24/13)
1x Asus RT-N16 SVN revision 20675 NEWD-2 K2.6
1x Linksys E4200 v3.0 r34777 mega (01/31/18 )
1x Buffalo WZR-HP-G300NH B0 B0 Gargoyle FW
1x Linksys WRT600N v1.1 (Bricked)
1x Linksys WRT54GL v1.1 (DD-WRT 26446)
1x Linksys WRT54GS v2.2 (DD-WRT 26446)
1x Linksys RVS4000 (stock fw)
3x D-Link DWL-7100AP (openWRT)
2x TP-Link TL-WA801ND (Bridge mode) 100mW TX-Power
Asus WL-520GU SVN 16403M NEWD-2 Eko std-nokaid
4x Fonera with Gargoyle FW
Sponsor
Vaako
DD-WRT User


Joined: 10 Jun 2009
Posts: 370

PostPosted: Wed Dec 15, 2010 2:31    Post subject: Reply with quote
Sloved the problem:

My VDSL2 modem is at: 192.168.2.1
My DD-WRT router RT-N16 at: 192.168.1.1

Code:
Startup:
ip addr add 192.168.2.2/24 dev vlan2 brd +


Code:
Firewall:
iptables -I POSTROUTING -t nat -o vlan2 -d 192.168.2.0/24 -j MASQUERADE

_________________
Regards,
Vaako

1x Netgear R7800 Nighthawk - firmware not decided yet !!!!
1x Netgear R7000 Nighthawk r36410
1x Ubiquiti RouterStation Pro DD-WRT r23204 std (12/24/13)
1x Asus RT-N16 SVN revision 20675 NEWD-2 K2.6
1x Linksys E4200 v3.0 r34777 mega (01/31/18 )
1x Buffalo WZR-HP-G300NH B0 B0 Gargoyle FW
1x Linksys WRT600N v1.1 (Bricked)
1x Linksys WRT54GL v1.1 (DD-WRT 26446)
1x Linksys WRT54GS v2.2 (DD-WRT 26446)
1x Linksys RVS4000 (stock fw)
3x D-Link DWL-7100AP (openWRT)
2x TP-Link TL-WA801ND (Bridge mode) 100mW TX-Power
Asus WL-520GU SVN 16403M NEWD-2 Eko std-nokaid
4x Fonera with Gargoyle FW
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Wed Dec 15, 2010 14:30    Post subject: Reply with quote
FYI your problem was that you were trying to assign the modem's IP to the router which should obviously not work. Now you're assigning the router an unused IP from the modem's subnet and so it's working.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Vaako
DD-WRT User


Joined: 10 Jun 2009
Posts: 370

PostPosted: Wed Dec 15, 2010 15:23    Post subject: Reply with quote
someone told me to use eth1 instead vlan1 or vlan2.
if i Telnet to the router and ifconfig i see that eth1 carries the modem Mac number so i suppose i had to use eth1 instead of vlan.

i only changed eth1 to vlan2 and rebooted the router and Voila it worked Very Happy

_________________
Regards,
Vaako

1x Netgear R7800 Nighthawk - firmware not decided yet !!!!
1x Netgear R7000 Nighthawk r36410
1x Ubiquiti RouterStation Pro DD-WRT r23204 std (12/24/13)
1x Asus RT-N16 SVN revision 20675 NEWD-2 K2.6
1x Linksys E4200 v3.0 r34777 mega (01/31/18 )
1x Buffalo WZR-HP-G300NH B0 B0 Gargoyle FW
1x Linksys WRT600N v1.1 (Bricked)
1x Linksys WRT54GL v1.1 (DD-WRT 26446)
1x Linksys WRT54GS v2.2 (DD-WRT 26446)
1x Linksys RVS4000 (stock fw)
3x D-Link DWL-7100AP (openWRT)
2x TP-Link TL-WA801ND (Bridge mode) 100mW TX-Power
Asus WL-520GU SVN 16403M NEWD-2 Eko std-nokaid
4x Fonera with Gargoyle FW
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Wed Dec 15, 2010 16:13    Post subject: Reply with quote
Vaako wrote:
someone told me to use eth1 instead vlan1 or vlan2.
if i Telnet to the router and ifconfig i see that eth1 carries the modem Mac number so i suppose i had to use eth1 instead of vlan.

i only changed eth1 to vlan2 and rebooted the router and Voila it worked Very Happy

The WAN port varies on different hardware but nvram get wan_ifname will always give the correct interface which is why the wiki uses it. However, this is beside my original point...

The only problem with your original ifconfig command was that you were assigning the modem IP to the router.

Quote:
ifconfig `nvram get wan_ifname`:0 192.168.2.254 netmask 255.255.255.0


Should have been:

ifconfig `nvram get wan_ifname`:0 192.168.2.2 netmask 255.255.255.0

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Vaako
DD-WRT User


Joined: 10 Jun 2009
Posts: 370

PostPosted: Thu Dec 16, 2010 9:13    Post subject: Reply with quote
i have replaced the commands by the one recommended at the wiki, and Yes it works!
http://www.dd-wrt.com/wiki/index.php/Access_To_Modem_Configuration

This is what i have done:

ip addr add 192.168.2.2/24 dev vlan2 brd +

replaced with:

ifconfig `nvram get wan_ifname`:0 192.168.2.2 netmask 255.255.255.0

and

iptables -I POSTROUTING -t nat -o vlan2 -d 192.168.2.0/24 -j MASQUERADE

replaced with:

iptables -t nat -I POSTROUTING -o `nvram get wan_ifname` -j MASQUERADE

Modem is at: 192.168.2.1
Router is at: 192.168.1.1

I hope someone can use this information!?

_________________
Regards,
Vaako

1x Netgear R7800 Nighthawk - firmware not decided yet !!!!
1x Netgear R7000 Nighthawk r36410
1x Ubiquiti RouterStation Pro DD-WRT r23204 std (12/24/13)
1x Asus RT-N16 SVN revision 20675 NEWD-2 K2.6
1x Linksys E4200 v3.0 r34777 mega (01/31/18 )
1x Buffalo WZR-HP-G300NH B0 B0 Gargoyle FW
1x Linksys WRT600N v1.1 (Bricked)
1x Linksys WRT54GL v1.1 (DD-WRT 26446)
1x Linksys WRT54GS v2.2 (DD-WRT 26446)
1x Linksys RVS4000 (stock fw)
3x D-Link DWL-7100AP (openWRT)
2x TP-Link TL-WA801ND (Bridge mode) 100mW TX-Power
Asus WL-520GU SVN 16403M NEWD-2 Eko std-nokaid
4x Fonera with Gargoyle FW
atca
DD-WRT Novice


Joined: 13 Aug 2008
Posts: 5

PostPosted: Sun Jan 23, 2022 16:02    Post subject: Reply with quote
I've followed these instructions, in the wiki.

Router at 192.168.3.1
Modem at 192.168.4.2

But whenever I try to access the modem, on 4.2 I am getting looped back to the router interface displaying at 4.2 which is clearly wrong. Any ideas? Anything I need to flush?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14243
Location: Texas, USA

PostPosted: Mon Jan 24, 2022 3:42    Post subject: Reply with quote
Quote:
On builds newer than 42755 you may need to change the above code and enter both lines under the firewall settings instead of splitting them:

ifconfig `nvram get wan_ifname`:0 10.0.0.2 netmask 255.255.255.0
iptables -t nat -I POSTROUTING -o `nvram get wan_ifname` -j MASQUERADE

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Michl
DD-WRT Novice


Joined: 03 Nov 2015
Posts: 43

PostPosted: Wed Oct 18, 2023 23:21    Post subject: Reply with quote
Is this use case configureable totally in the dd-wrt ui (like virtual interface and route policies)?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12913
Location: Netherlands

PostPosted: Thu Oct 19, 2023 6:48    Post subject: Reply with quote
Michl wrote:
Is this use case configureable totally in the dd-wrt ui (like virtual interface and route policies)?


Certainly Smile

For some general recommended reading:
See the forum guidelines with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Michl
DD-WRT Novice


Joined: 03 Nov 2015
Posts: 43

PostPosted: Thu Oct 19, 2023 11:26    Post subject: Reply with quote
Can you give us a short tutorial? Wink
Thanks
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum