Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » O Canada! » Canadian » TekSavvy » [HOWTO] Connecting to modem through router
Search Topic:
Uniqs:
1923
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
new tsi sign up »
« Bell Canada - Privacy Complaint Over Deep Packet Inspection  
AuthorAll Replies

mactalla

join:2008-02-19
·TekSavvy Solutions..

 [HOWTO] Connecting to modem through router

This question has come up many times and always seems to be new for people. So I'm making a whole new topic with appropriate subject so this can hopefully be found more easily via search, etc. I will endever to keep this generic to all modem/router/firmware configurations yet also easy to follow step-by-step. Corrections and improvements are welcome.

=== What ===
Modems often permit connecting to them via a web or telnet interface to configure or obtain useful information. When a modem is plugged into a router which then is connected to the computers on the network, the modem cannot be accessed. This How-to explains how to access the modem just like any other computer on the network.

=== Why ===
Especially on these forums, running DMT to connect to the modem (which is done via telnet) is a convenient way to get line stats. This is useful both for an initial setup, but also to audit occasionally. Unplugging the modem to connect directly to it at these times is both troublesome and disruptive to anyone else attempting to access the internet in the same home.

=== How ===
Preparation: A-C

A. First, you need to be able to make changes to the routing. If you walk into your favourite computer store, buy a router and bring it home, you cannot make the necessary changes. For this (and other) reasons, we have custom firmware. Three popular firmwares are: DD-Wrt, OpenWrt and Tomato.

For more information on each of these, see their respective sites:
DD-Wrt: »www.dd-wrt.com
OpenWrt: »www.openwrt.org
Tomato: »www.polarcloud.com/tomato

B. Secondly, you need to know the IP address your modem will respond to. We'll call this $MODEM_IP.
Some known modem IP's:
ST516: 192.168.1.254 and 10.0.0.138
2Wire: 192.168.1.254
DLink 300i: 192.168.1.1 (could be 192.168.0.1 -- I may have changed mine)

C. Finally, you need to know the name of the interface on your router where your modem is plugged in. The modem is usually plugged into the WAN port of the router. See »wiki.openwrt.org/OpenWrtDocs/Configuration for a list of routers and their interface names. We'll call this $WAN_IFACE.
The name of the WAN interface for a few common routers are:
Linksys WRT54GL: vlan1
Linksys WRTSL54GS: eth1
Asus WL-500g: eth1
Asus WL-500g Deluxe/Premium: vlan1

Once you have the information for your particular modem and router, we can configure the router.

Steps: 1-3

1. First, we need to set the interface identified in 'C' to an IP address that is on the same subnet. For example, if the modem is on 192.168.1.254, then we want 192.168.1.pick-a-number (where pick-a-number is not 254 (the modem), or 255 (broadcast), or any other machine on the network. 250 would likely be good. We'll call this $WAN_IP. The command "ipconfig $WAN_IFACE $WAN_IP" should do the trick.

2. Now, we need to update the routing with these two commands:
iptables -A forwarding_rule -d $MODEM_IP -j ACCEPT
iptables -t nat -A POSTROUTING -d $MODEM_IP -j MASQUERADE

3. And of course you want that to happen automatically anytime your router (re)boots. So make a script that does this and have it run on boot.

The exact location to place these commands differs depending on the firmware.

On DD-Wrt routers, place the script files in /jffs/etc/config/
This can be done by ssh'ing into the router and pasting the following lines to the console (set the values on lines 3, 4 and 8 to be correct for your setup):

Note: the above is slightly modified from »www.dd-wrt.com/wiki/index.php/Ac···guration I would appreciate if anyone running DD-Wrt could confirm here that the above works correctly for you.

On OpenWrt routers, startup scripts are placed in /etc/init.d/
SSH into the router and paste the following commands to the console (set the values on lines 9, 10 and 11 to be correct for your setup):

Note: this works for WhiteRussian. I don't know whether the script needs to be modified for Kamizake -- the only part that might is whether pppoe is still detected via nvram.

On Tomato routers... could someone chime in here? Where do scripts belong?

If you've read this far, hopefully it was helpful. Again, corrections/improvements are welcome!
Forums » O Canada! » Canadian » TekSavvynew tsi sign up »
« Bell Canada - Privacy Complaint Over Deep Packet Inspection  


Sunday, 05-Jul 15:26:46 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 9.5 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [146] Biden Unveils Broadband Stimulus
· [95] AT&T: 65,000 SMS Sent Per SECOND
· [95] Fourth Of July Open Thread
· [92] Compuserve Classic Says Goodnight
· [85] Obama Using NSA, AT&T For New Snooping Project
· [83] Thomas To Appeal Huge RIAA Fines
· [71] iPhone 3GS Already Jailbroken
· [67] Verizon: Cut Your Landline To Save Money
· [61] Cable Carriers Miss Tru2Way Deadline
· [60] The Pirate Bay Gets Sold
Most people now reading
· TekSavvy Down (EDIT: Now back online) [TekSavvy]
· 55 bugs in new Firefox 3.5: users are posting complaints [Security]
· 6 firetrucks at 151 [TekSavvy]
· [ Classes] DK best DPS spec [World of Warcraft]
· Its the Traffic Management Super Bowl! [TekSavvy]
· wasp problemb [Home Repair & Improvement]
· NSA plans massive, 65MW, $2bn data center in Utah [Security]
· [ Professions] Northrend Herbalism and Mining Tracks [World of Warcraft]
· Symantec executive: dangerous to run free antivirus [Security]
· Single-link MLPPP on Windows with Virtualbox (instructions) [TekSavvy]