What's new

Access modem configuration page

  • 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!

Okay, now try running this command:

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

If that works, it sounds like it's just a problem with the JFFS scripts... Can you verify that the scripts are in place and correct?
 
A good way to help troubleshooting scripts is to put the following at the top of the script. For example, begin your init-start like this:

Code:
#!/bin/sh
touch /tmp/000init-start
...put the rest of your code below here...

After that, you can ensure the script did get executed by checking if the file exists in /tmp:

Code:
ls /tmp/000*
 
Okay, now try running this command:

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

If that works, it sounds like it's just a problem with the JFFS scripts... Can you verify that the scripts are in place and correct?

i tried this iptables command after the ifconfig command but cant access the modem page at 192.168.1.1.
i have been trying these commands over ssh. as i couldnt get them to work i havent made the scripts.

forgot to mention i have a gigabit switch between router and pc , dont know if that can be a problem.

thanks
 
Hi truva!

I did what you suggested and everything worked perfectly :)

I have a question though, how can I disable this access to the guest wireless network?

Thanks in advance!
 
If you are using Merlin's firmware, here is a definitely working way of accessing modem interface through the router:

1. Give your modem an IP that is outside the router's ip range. (Your IP numbers 192.168.0.1 for modem and 192.168.1.1 for router are ok).

2. Enable jffs partition.

3. You need to add two scripts to the /jffs/scripts directory, namely wan-start and nat-start scripts.


wan-start script :

#!/bin/sh
ifconfig `nvram get wan0_ifname`:0 192.168.0.2 netmask 255.255.255.0

Note : the IP number shown in bold must be one more than your modem's IP. If your modem's ip is 192.168.0.1 then it must be written as 192.168.0.2.


nat-start script :

#!/bin/sh
iptables -t nat -I POSTROUTING -o `nvram get wan0_ifname` -j MASQUERADE



Before adding scripts, you can check if this works for you easily. Just SSH to your router and enter the commands in the scripts (you can use copy-paste). Then open a browser session to your modem (192.168.0.1 in your case) and there is your modem interface.

Adding scripts just makes sure that the commands are run on router startup.

--

Please help!

My modem is 192.168.1.1, and the router is 192.168.0.1

So on this page http://192.168.0.1/Tools_RunCmd.asp I run the following commands:

ifconfig `nvram get wan0_ifname`:0 192.168.1.2 netmask 255.255.255.0

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

Then I tried 192.168.1.1 - still no love - what am I doing wrong?

thanks in advance!
 
Folks - for at least single WAN scenarios there is a simple an elegant solution, and credit goes to ariesmk from DSLReports forum

http://www.dslreports.com/forum/r28945117-~time=1389309874

Go to http://192.168.0.1/Advanced_WAN_Content.asp

LAN > LAN IP

IP Address: 192.168.0.1

WAN > Internet Connection

WAN IP Setting -

Get the WAN IP automatically: No
IP Address: 192.168.1.2
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

This should allow you to access the SmartRG through your router.
 
If you are using Merlin's firmware, here is a definitely working way of accessing modem interface through the router:

1. Give your modem an IP that is outside the router's ip range. (Your IP numbers 192.168.0.1 for modem and 192.168.1.1 for router are ok).

2. Enable jffs partition.

3. You need to add two scripts to the /jffs/scripts directory, namely wan-start and nat-start scripts.


wan-start script :

#!/bin/sh
ifconfig `nvram get wan0_ifname`:0 192.168.0.2 netmask 255.255.255.0

Note : the IP number shown in bold must be one more than your modem's IP. If your modem's ip is 192.168.0.1 then it must be written as 192.168.0.2.


nat-start script :

#!/bin/sh
iptables -t nat -I POSTROUTING -o `nvram get wan0_ifname` -j MASQUERADE



Before adding scripts, you can check if this works for you easily. Just SSH to your router and enter the commands in the scripts (you can use copy-paste). Then open a browser session to your modem (192.168.0.1 in your case) and there is your modem interface.

Adding scripts just makes sure that the commands are run on router startup.

--

Thank you for posting this, it works great when tested using putty as you suggested, but now I would like to have these script automatically started on power on, can someone please tell me how to copy this to the appropriate location?

Thanks!
 
I also had the same issue. I just updated the firmware and did a factory reset and I then could access my modem.
my router IP is 192.168.1.1 and modem IP is 192.168.0.1
 
can someone please tell me how to copy this to the appropriate location?
You need to access the router via telnet or better ssh to transfer the files to the mentioned folder.
Acitvate ssh and jffs on the router, download WinSCP and access your router with your routers user/pass.
Then you create the files and add the content as described.
 
A good way to help troubleshooting scripts is to put the following at the top of the script. For example, begin your init-start like this:

Code:
#!/bin/sh
touch /tmp/000init-start
...put the rest of your code below here...

After that, you can ensure the script did get executed by checking if the file exists in /tmp:

Code:
ls /tmp/000*

Or just put things into the system log......for example....for my wan-start script I start with (after the shebang)

logger wan-start script : start

then do this after I get things set up to print iptables into the log....

iptables -t mangle -L PREROUTING -n | logger

you can also do things like this to put debug info into the log

echo "Some message" | logger

and end with

logger wan-start script : finish
 
Hi Truva, need help

After adding above script, my internet connection speed drops by 60% .... speedtest.net start with optimal speed for 1 or 2 second then drop by 60 to 70% ... i am using Asus AC66U with Tanda D-301.

Thanx
 
Folks - for at least single WAN scenarios there is a simple an elegant solution, and credit goes to ariesmk from DSLReports forum

http://www.dslreports.com/forum/r28945117-~time=1389309874

Go to http://192.168.0.1/Advanced_WAN_Content.asp

LAN > LAN IP

IP Address: 192.168.0.1

WAN > Internet Connection

WAN IP Setting -

Get the WAN IP automatically: No
IP Address: 192.168.1.2
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

This should allow you to access the SmartRG through your router.

Another first time user here. I just installed Merlin's firmware, 380.63, on a new RT-AC88U. I've run Tomato on a previous ASUS router for several years but never used the ASUS firmware. I too am trying to access my ARRIS SB6183. The modem has an IP address of 192.168.100.1 and I can find no way to change it. My router's network is on 192.168.1.2/254 with the router at 192.168.1.1.

I followed the above instructions with the following changes:

LAN IP Address 192.168.1.1
WAN IP to Static
IP Address 192.168.100.2
Subnet Mask 255.255.255.0
Default Gateway 192.168.100.1

These changes allowed me to access the modem GUI. However, they prevented me from accessing the internet. I suspect I'm missing something simple but I haven't been able to figure out what. Any suggestions would be appreciated.

Thanks
 
Make the following two scripts (using WinSCP, or telnet/ssh and vi or nano)....

/jffs/scripts/nat-start
Code:
#!/bin/sh
# Allow modem access (also wan-start)
iptables -t nat -I POSTROUTING -o `nvram get wan0_ifname` -j MASQUERADE
exit

/jffs/scripts/wan-start
Code:
#!/bin/sh
# Allow modem access (also nat-start)
ifconfig `nvram get wan0_ifname`:0 192.168.100.2 netmask 255.255.255.0
exit
 
Thanks for the quick reply. Now I just need to learn about scripts, WinSCP etc. Off to do that.
 
I can see how post #34 works with the scripts but if the WAN interface was configured with a static IP of 192.168.100.2 as in post #33, will the router still pull the dynamic IP for the WAN interface via DHCP since I thought for the DHCP to work, one had to set the WAN to DHCP. Also, is it possible to do this with ASUS's firmware since the GT-AC5300 is not supported by Merlin in the near future.
 
Is there any way you can help me?

Unfortunately, my modem specifies this unchangeable IP 169.254.2.1,
but it is possible to access the modem Web UI via LAN.

Router:
LAN IP Address 192.168.1.1
Subnet Mask 255.255.255.0
WAN IP to Automatic
or
WAN IP to Static
IP Address 169.254.2.2
Subnet Mask 255.255.255.0
Default Gateway 169.254.2.1

With static IP allocation I have already tried to get access to the modem - but also here without success.

ifconfig
Code:
ASUSWRT-Merlin RT-AC88U 382.2-beta3 Wed Jan 17 05:42:10 UTC 2018
...@RT-AC88U-A5:/tmp/home/root# ifconfig
br0       Link encap:Ethernet  HWaddr 60:45:CB:18:80:78
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::6245:cbff:fe18:8078/64 Scope:Link
          inet6 addr: 2003:da:4bd7:6200::1/56 Scope:Global
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:52182 errors:0 dropped:0 overruns:0 frame:0
          TX packets:361087 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8102626 (7.7 MiB)  TX bytes:497723012 (474.6 MiB)

eth0      Link encap:Ethernet  HWaddr 60:45:CB:18:80:78
          inet6 addr: fe80::6245:cbff:fe18:8078/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:344700 errors:0 dropped:0 overruns:0 frame:0
          TX packets:195630 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:489450892 (466.7 MiB)  TX bytes:20749609 (19.7 MiB)
          Interrupt:180 Base address:0x5000

eth1      Link encap:Ethernet  HWaddr 60:45:CB:18:80:78
          inet6 addr: fe80::6245:cbff:fe18:8078/64 Scope:Link
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:844 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6281 errors:0 dropped:7 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:220203 (215.0 KiB)  TX bytes:1609903 (1.5 MiB)

eth2      Link encap:Ethernet  HWaddr 60:45:CB:18:80:7C
          inet6 addr: fe80::6245:cbff:fe18:807c/64 Scope:Link
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:6068 errors:0 dropped:0 overruns:0 frame:0
          TX packets:307615 errors:0 dropped:3 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1013944 (990.1 KiB)  TX bytes:451301031 (430.3 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:19083 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19083 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4466426 (4.2 MiB)  TX bytes:4466426 (4.2 MiB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:84.157.149.137  P-t-P:62.155.247.225  Mask:255.255.255.255
          inet6 addr: 2003:da:4bbf:1761:98a9:1717:c3ea:cbf4/64 Scope:Global
          inet6 addr: fe80::98a9:1717:c3ea:cbf4/10 Scope:Link
          UP POINTOPOINT RUNNING MULTICAST  MTU:1492  Metric:1
          RX packets:27465 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25430 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:17508323 (16.6 MiB)  TX bytes:4389453 (4.1 MiB)

vlan1     Link encap:Ethernet  HWaddr 60:45:CB:18:80:78
          inet6 addr: fe80::6245:cbff:fe18:8078/64 Scope:Link
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:1169 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7224 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:132262 (129.1 KiB)  TX bytes:1815234 (1.7 MiB)

vlan7     Link encap:Ethernet  HWaddr C8:69:CD:3D:45:8F
          inet addr:169.254.99.149  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:342889 errors:0 dropped:0 overruns:0 frame:0
          TX packets:188392 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:483083078 (460.7 MiB)  TX bytes:17016639 (16.2 MiB)

wds0.1    Link encap:Ethernet  HWaddr 60:45:CB:18:80:78
          inet6 addr: fe80::6245:cbff:fe18:8078/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:36076 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61611 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5234620 (4.9 MiB)  TX bytes:48387013 (46.1 MiB)

route
Code:
ASUSWRT-Merlin RT-AC88U 382.2-beta3 Wed Jan 17 05:42:10 UTC 2018
...@RT-AC88U-A5:/tmp/home/root# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
62.155.247.225  *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
169.254.0.0     *               255.255.0.0     U     0      0        0 vlan7
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         62.155.247.225  0.0.0.0         UG    0      0        0 ppp0
miju@RT-AC88U-A5:/tmp/home/root#



Thank you for watching. :)
 
Last edited:
Doesn't anyone really have an approach? :(
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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