Change wan by sms

Good morning,

I have a rutx14 and I would like to disable and enable wired wan to use sim via sms command.
How can I do that?

If it is not possible via sms are there any alternatives?

Thank you

Hello,

To disable the wired WAN interface on your RUTX14 via SMS, you can use the following command:
<admin password> uci set network.wan.disabled=1 && uci commit network

To re-enable the wired WAN, use:
<admin password> uci set network.wan.disabled=0 && uci commit network

After executing either command, you’ll need to reboot the router for the changes to take effect. You can do this by sending:
<admin password> reboot

Let me know if you need further assistance!

Best regards,

Thanks for the reply, it works!

Is it possible to do the same thing maybe through curl or other calls? Maybe without the need to reboot?

hello,
If anyone needs I was able to do it through snmp.
Maybe there is a better solution?

disable wan
snmpset -v 3 -u snmpv3USER -l noAuthNoPriv routerip .1.3.6.1.2.1.2.2.1.7.3 i 2

enable wan
snmpset -v 3 -u snmpv3USER -l noAuthNoPriv routerip .1.3.6.1.2.1.2.2.1.7.3 i 1

1 Like

Hello,

Another more efficient way to achieve this without requiring a reboot is by creating two SMS rules that would execute a custom script using SMS Utilities. Below is a configuration example for scripts to disable and enable the WAN interface.

Example for disabling WAN:

uci set network.wan.disabled=1 && uci commit network  
/etc/init.d/network restart  

Example for enabling WAN:

uci set network.wan.disabled=0 && uci commit network  
/etc/init.d/network restart  

The /etc/init.d/network restart command is necessary to ensure the changes are applied immediately.

Best regards,