What's new

Accessing my modem GUI

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

tarassippo

Regular Contributor
Hi All,

Searching the Internet for a solution, I read that in order to access my modem GUI (which is connected to an RT-AC66U_B1 with Merlin v384.12) I should have had simply typed from within a SSH session the following command:
Code:
ifconfig $(nvram get wan0_ifname):0 192.168.1.2 netmask 255.255.255.0
being the IP modem address 192.168.1.1

And it actually works, so happy days...

The article also mentioned a second command, that is
Code:
iptables -t nat -I POSTROUTING -o $(nvram get wan0_ifname) -j MASQUERADE
which I didn't type as I have no clue whatsoever what it does and with the first command I am able to access the modedm GUI.

So, can someone please explain to me what that second command does and whether it's necessary (perhaps for security reasons ?) that I should also include/type in that command ?

Tia.
 
Meanwhile wanted to go one step further and I thought it would be nice to have a script which could run the command every time the rooter must be rebooted...

I had a read of this: https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts and I've created a file called wan-start and saved as Unix script file with Notepad ++
Capture3.JPG


then copied that in the /jffs/scripts/ directory with WinSCP
Capture2.JPG


and I've enabled JFFS
Capture.JPG


and I have set the script being executable as per Merlin guide...

I did reboot the router a few times but unfortunately the script seems not running as I have to input the command through SSH in order to access the modem GUI, what am I missing ?

Thanks.
 
Last edited:
Thanks, but like I said in the first post, I can access the modem GUI...

My 2 questions were about a second command and the script which doesn't run when I reboot the router...
 
So, I fixed the script issue, that is I just had to add sleep 20s and now it works.

Any networking savvy willing to advise if I'd have any security issues not running the second command ?

Code:
iptables -t nat -I POSTROUTING -o $(nvram get wan0_ifname) -j MASQUERADE

Tia.
 

Latest threads

Sign Up For SNBForums Daily Digest

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