I am using the RUT240 router, it has the firmware version RUT2_R_00.07.04.2 installed. Through python, I am using the JSON-RPC protocol to connect to the router and apply changes in its configuration, one of these changes is to set the WAN ethernet port as LAN, I thought I had to change the network configuration like this:

  • uci set network.lan.ifname=‘eth0 eth1’
  • uci set network.wan.disabled=1
  • uci set network.wan6.disabled=1

However, when I did this, the WAN port still did not work as LAN, so I accessed the web interface and manually made the changes, when I did so, I realized that the first command of all is wrong and, that the correct method is:

  • uci set network.br_lan.ports=‘eth0’ ‘eth1’

But I don’t know how to write that value neither from python, nor from the CLI, the quotes are being a problem. Since every time I try, either the command gives me the wrong value or additional characters are written, causing the router to lose full connectivity and I have to factory reset it.

Best regards,



  • uci set network.br_lan.ports=‘eth0 eth1’

the 2 ’ in the middle are not needed,

you also need uci commit to apply the changes

1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.