What's new

How to access modem through router?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Perhaps I am wrong. what stops the router in default configuration from passing private ip's out of the WAN?

If the IP is in the same subnet as your LAN, then there is no route that tells it to send it to the WAN interface - LAN traffic will stay inside the LAN, as it's the same subnet.

If the IP is a different subnet, then that traffic will get sent to the default gateway provided by your ISP, at which point it's your ISP that does what it wants with it (usually it will drop it).

If you have something on the WAN interface that is local to you (for example, a modem), then you will need to add an IP within that same subnet to your router's WAN interface, so it won't forward it to the default gateway. This is required if, for example, you want to access your modem's internal web interface. It MUST be a different subnet than your LAN. I can confirm that this works just fine, I used to do it myself back when I used an ADSL modem last year.
 
The only way he could include the other network in his local LAN is if he used a class B mask 255.255.0.0 on his local IP address but his example mask is 255.255.255.0. The router should be able to connect to the modem outside the WAN port since the mask is 255.255.255.0

PS
A class A mask of 255.0.0.0 would also encompass that outside address.
 
Last edited:
A simple test would be to place a switch between the modem and the router. Plug a laptop into the switch with an IP address in the same network scope as the modem. Try to connect to the modem with the laptop. If you connect to the modem fine then there is a router issue. If you cannot connect then you have a modem issue. Some modems are not accessible when they are in bridged mode.
 
A simple test would be to place a switch between the modem and the router. Plug a laptop into the switch with an IP address in the same network scope as the modem. Try to connect to the modem with the laptop. If you connect to the modem fine then there is a router issue. If you cannot connect then you have a modem issue. Some modems are not accessible when they are in bridged mode.

My modem also changes it's own LAN IP when it's in bridge mode , 192.168.1.0 normally and 192.168.1.10 when bridged....I wonder if thats possibly the problem.
 
For some models you have to use 192.168.50.1, have a look into your handbook.
This thread is 6 years old!
 
I have a similar problem - I can't access my modem's UI when it's connected to the WAN port. It works if I connect it to a LAN port though. So how do I do this:
If you have something on the WAN interface that is local to you (for example, a modem), then you will need to add an IP within that same subnet to your router's WAN interface, so it won't forward it to the default gateway. This is required if, for example, you want to access your modem's internal web interface. It MUST be a different subnet than your LAN. I can confirm that this works just fine, I used to do it myself back when I used an ADSL modem last year.
using my routers web UI?
Router's IP is 192.168.1.1
Modem's IP - is 192.168.2.1 fine?
Then what do I put in those fields? (see attachment)
 

Attachments

  • 123.png
    123.png
    187.6 KB · Views: 247
I have a similar problem - I can't access my modem's UI when it's connected to the WAN port. It works if I connect it to a LAN port though. So how do I do this:

using my routers web UI?
Router's IP is 192.168.1.1
Modem's IP - is 192.168.2.1 fine?
Then what do I put in those fields? (see attachment)

You should provide your modem and router make/model info for information requests.

My setup: Viasat SB-2 Satellite Modem to Asus RT-N66; by ethernet, modem port to router wan port. Router IP 192.168.1.1, Can access modem at 192.168.100.1 from any IP within LAN. Access is by entering modem IP in browser address bar. My router provides no direct access to modem UI but must be through browser on a computer on my LAN.

Some combined modem/router devices are different...require router connect to modem via LAN port but I have no direct experience. You might want to ask your ISP about this.
 
You should provide your modem and router make/model info for information requests.

My setup: Viasat SB-2 Satellite Modem to Asus RT-N66; by ethernet, modem port to router wan port. Router IP 192.168.1.1, Can access modem at 192.168.100.1 from any IP within LAN. Access is by entering modem IP in browser address bar. My router provides no direct access to modem UI but must be through browser on a computer on my LAN.

Some combined modem/router devices are different...require router connect to modem via LAN port but I have no direct experience. You might want to ask your ISP about this.
I can change my modem's IP to whatever I want, that's why I'm asking if 192.168.2.1 is fine or should I set it differently.

I think I understand the problem now and it requires me to use these scripts:
https://www.snbforums.com/threads/access-modem-configuration-page.11957/page-2#post-289752
1. Can it be somehow done through the web UI? (I guess not)
2. Why some people don't have to do that, like wh7qq for example.
 
1. Can it be somehow done through the web UI? (I guess not)
No.
2. Why some people don't have to do that, like wh7qq for example.
It depends on the specific modem being used. That is why we asked for that information (which you still haven't provided).

You should also state the model of router you have and the firmware version as that also has a bearing.
 
Linksys WAG200G as a bridged modem (192.168.100.1), Asus DSL-N14U B1 as a router (newest firmware, 192.168.1.1; yes, I know it has an ADSL modem built-in).
I can connect to the modem by:
1. Plugging it directly to a PC.
2. Plugging it into my router's LAN port.
3. Plugging it into the WAN port and using this guide (but obviously there's no Internet access this way): https://github.com/RMerl/asuswrt-merlin.ng/wiki/Access-modem-Web-UI-on-WAN-port-(no-script)

That means I probably have to use the mentioned scripts, but when I connect with my router through telnet and try to execute this command:
Code:
ifconfig `nvram get wan0_ifname`:0 192.168.100.2 netmask 255.255.255.0
I get this:
Code:
# ifconfig `nvram get wan0_ifname`:0 192.168.100.2 netmask 255.255.255.0
-sh: nvram: not found
SIOCSIFADDR: No such device
SIOCSIFNETMASK: No such device
I could probably do this without nvram, but I'm not sure which interface is my WAN port (ifconfig lists a bunch of them; it's number 3 on my router).
 
If you show us the output of the ifconfig command we might be able to make an educated guess about which interface to use. But even if we got it to work the problem will be that any changes you make will be lost when the router is rebooted.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top