What's new

SSH newbie trying to do a simple settings edit not available in router 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!

kurayami88

New Around Here
Hi,

Need help trying to use SSH on asus router STOCK FIRMWARE since my router is not supported by Merlin (TUF AX3000).
I would like to disable the UPNP secure mode. but i only manage to get 1/2 way done...

these are the steps i managed...

1) windows powershell AS admin
2) ssh username@router_ip_address
3) cd /etc/upnp
4) vi config
5) \**edit file**
6) esc, then enter :wq
7) enter command :
> killall miniupnpd
> miniupnpd -f /etc/upnp/config

==================================
however, it might appear this is not the proper settings file? as the asus logs throw a "it is advise to use network interface name instead of xxxxxx" which doesnt show up by default when you initial boot the router.
Also, these settings do not retain if you reboot the router... if the router is switched off / rebooted ... the secure mode is enabled by default again.


I scoured the internet and forums for some guidance on SSH editing but found little to no results ....
any help is much appreciated https://emojipedia.org/folded-hands/
 
If you're NOT using the Merlin firmware, then why are you in the Merlin-specific forum? Seems you should be using the following forum instead.


The issue is NOT ssh. Like most router firmware, stock or third-party, you can't directly edit config files and make them persistent. It's done this way so it's NOT easy for the user to make an error and make the router unrecoverable. A simple reboot returns things to normal. In the case of stock firmware, if it's supported at all, you typically have to use some "trick" to trigger the router into calling your own script, stored somewhere in /jffs, to reconfigure a service, then restart it. The following link seems to be how ASUS does it (I don't use the stock firmware myself).

 
If you're NOT using the Merlin firmware, then why are you in the Merlin-specific forum? Seems you should be using the following forum instead.

yea but mods and scripting is in this merlin forum...
stock firmware doesn't talk about editing / customising https://emojipedia.org/folded-hands/


The issue is NOT ssh. Like most router firmware, stock or third-party, you can't directly edit config files and make them persistent. It's done this way so it's NOT easy for the user to make an error and make the router unrecoverable. A simple reboot returns things to normal. In the case of stock firmware, if it's supported at all, you typically have to use some "trick" to trigger the router into calling your own script, stored somewhere in /jffs, to reconfigure a service, then restart it. The following link seems to be how ASUS does it (I don't use the stock firmware myself).

thanks for the heads up on the persistent part...
i wonder if there is a way to show the option in the GUI and make it selectable then like in the Merlin firmware...
*wonders how merlin enables various options in his custom firmware...

i guess ssh editing is not the proper way then... more of a one-off deal?

Thank you so much for your input!
 
thanks for the heads up on the persistent part...
i wonder if there is a way to show the option in the GUI and make it selectable then like in the Merlin firmware...
*wonders how merlin enables various options in his custom firmware...

He adds/changes/modifies the GUI's configuration files. There is a facility to add your own pages w/ the Merlin firmware, and many Merlin AddOns use it for these purposes. But I have no idea if the stock firmware would allow the same. Few users would bother to take things that far. It's rarely worth the effort. Not unless you're providing a complex set of additional features for the masses.

i guess ssh editing is not the proper way then... more of a one-off deal?

Again, the issue is NOT ssh. You can absolutely use ssh to create/edit files. The problem is that any changes to the config files in /etc (or pretty much anywhere else other than /jffs) will NOT persist across a reboot. Instead, you have to create your own script, store it in /jffs, have that script create its own config file (probably based on the default config file used by the service), kill the existing service, then restart the service again, but w/ YOUR config file. And finally, have your script triggered by the system (and at the right time).

IOW, it's a bit tedious and complex, esp. the first time you attempt it. Frankly, I'm surprised the stock firmware even allows it (it can also raise security issues). Most OEM's go out of their way to NOT support such changes. They don't want the support headaches!
 

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