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!

charliehound

New Around Here
I’m trying to gain access to my TP-Link TD8817 modem through my Asus RT-N66U router. I have my modem IP set to 192.168.0.254 and my router IP set to 192.168.1.1.

I believe I need to run the following scripts…

ifconfig eth0:0 192.168.0.253 netmask 255.255.255.0

and

iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE


Or add those scripts to startup files like this..

#!/bin/sh
ifconfig eth0:0 192.168.0.253 netmask 255.255.255.0

and

#!/bin/sh
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE

That part I understand (I think/hope?) but I can’t find anywhere to add the startup scripts in the N66U’s GUI, and feel free to laugh but I have no idea how to create a file on the router from a shell/telnet etc. (I'm a complete Linux noob)

I'm using Merlin's firmware and I’ve enable and formatted the JFFS partition and I managed to gain access to it via telnet but that’s as far as I can get and I’m completely lost after that.

Could anyone give me an idiots guide on how to install these scripts so they run at startup?

Thanks in advance.
 
Have you tried to access the modem IP address? Since the modem and the router are in different IP networks it should just work because the modem is outside the WAN port and the default gateway is pointing outside the network through the WAN port. All IP addresses not in the router’s inside network are routed to the default gateway which points outside the WAN port to where the modem is.

I don’t own an ASUS router but my TP-Link and Cisco routers work that way.
 
What coxhaus said...my modem is 192.168.0.1 , my router is 192.168.1.1 , just entering 192.168.0.1 in a browser gets me to the modems setup pages.
 
Yes, it is easy, you should be able to access the modem at it's IP address. The IP address of my cable modem is 192.168.100.1, and I can just go there with a browswer and see what's available in its web GUI. Not a lot without a password (which I don't have), but I can see the various DOCSIS 3.0 up and down channels and their maximum speeds, signal "powers", battery status, etc.

I've used this in the past to see whether it's time to reset my cable modem, since this sometimes shows up by changes in the up and down channels.
 
Thanks for the replies...

I have tried to access the modem using its IP address in a browser but it just times out. Same if I try to SSH/Telnet into it, it times out.
 
I would try to undo all the iptable changes you have made. Maybe reset the router back to hardware defaults. I think the default gateway should take care of your problem providing you have not routed the network elsewhere.
 
I access my Viasat (Exede) sb2 modem thru its IP:192.168.100.1. The status pages come up nicely in Chrome or Firefox.
 
Sorry I don't know how to add your commands to the stock firmware. You can't just access the modem because it is on a different subnet. The router won't route private network addresses. The idea is to add an ip address to your WAN interface that is on the same subnet as the modem. Your commands look correct. The only thing you have to be sure about is that you have the correct WAN interface specified.
 
Sorry I don't know how to add your commands to the stock firmware. You can't just access the modem because it is on a different subnet. The router won't route private network addresses. The idea is to add an ip address to your WAN interface that is on the same subnet as the modem. Your commands look correct. The only thing you have to be sure about is that you have the correct WAN interface specified.

So do ASUS routers not have default gateways? I have never known a router not to have a default gateway.
 
So do ASUS routers not have default gateways? I have never known a router not to have a default gateway.

Yes, the default gateway for your network is your router, and the default gateway address is the IP address of your router. My router's address (and my network's default gateway) is 192.168.1.1, which is typical for simple home networks, but some people set their router's IP address to something else for various reasons. And all my clients are on the "192.168.1" subnet, and are configured to use the 192.168.1.1 default gateway IP for routing.
 
Your router default IP address should be 0.0.0.0. I am not talking about your network default IP address which is your router address.

Asus should not be filtering private IP addresses. It is not its job. It is your ISP's job.

Time Warner has assigned me a private IP address for their DHCP server. This is going to cause problems with ASUS routers if they are filtering private IP addresses.
 
Your router default IP address should be 0.0.0.0. I am not talking about your network default IP address which is your router address.

Asus should not be filtering private IP addresses. It is not its job. It is your ISP's job.

Time Warner has assigned me a private IP address for their DHCP server. This is going to cause problems with ASUS routers if they are filtering private IP addresses.

Okay then, if you're not talking about your default gateway, an Asus router default IP address is 198.162.1.1. Not sure what the 0.0.0.0 IP address thing is?
 
Your router default gateway and your network default gateway are different.

Your network default gateway is where your workstation sends IP traffic when they don’t know where to send the IP traffic and cannot resolve the MAC address.

Your router default gateway is where your router sends IP traffic when your router does not have a route for that network or IP.
 
Last edited:
So do ASUS routers not have default gateways? I have never known a router not to have a default gateway.

Sure routers have default gateways but they don't typically pass private traffic. Think about it how would other routers on the internet know where to send private traffic when anybody can have a 192.168.1.* address.
 
Sure routers have default gateways but they don't typically pass private traffic. Think about it how would other routers on the internet know where to send private traffic when anybody can have a 192.168.1.* address.

I think you are talking over your head about routing.

Do you think it is the consumer level routers controlling what gets passed on the internet????
 
I think you are talking over your head about routing.

Do you think it is the consumer level routers controlling what gets passed on the internet????

Yes, I think consumer level routers look at lan, private network traffic (for example 192.168.*.* traffic) and decide NOT to pass it to the WAN. That is one of the main functions of a router, to keep WAN and LAN separate. And if by some chance the router did pass the private traffic 'upstream' (which in my experience is NOT the default behavior of routers) the next router would see it and reject it.
 
I guess I will never buy or recommend an ASUS router because I want a router with a correctly working default gateway.


It is going to get interesting when we run out of IP addresses and ISPs start using private IP addresses for their networks.
 
I guess I will never buy or recommend an ASUS router because I want a router with a correctly working default gateway.


It is going to get interesting when we run out of IP addresses and ISPs start using private IP addresses for their networks.

Not sure what you are talking about, but routing works just fine when the WAN has a private IP. That's how my development router has been configured for over a year, with no issue at all. WAN is 192.168.10.xxx, and LAN is 192.168.1.xxx.

Routing has nothing to do with whether an IP is private or public, it has to do with what entries you have in the router's routing tables.
 
Not sure what you are talking about, but routing works just fine when the WAN has a private IP. That's how my development router has been configured for over a year, with no issue at all. WAN is 192.168.10.xxx, and LAN is 192.168.1.xxx.

Routing has nothing to do with whether an IP is private or public, it has to do with what entries you have in the router's routing tables.

Well that is the way it should work. I was responding to bird333 statement that ASUS routers filter private IP addresses going to the WAN port which makes no sense to me.
 
Well that is the way it should work. I was responding to bird333 statement that ASUS routers filter private IP addresses going to the WAN port which makes no sense to me.

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

Sign Up For SNBForums Daily Digest

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