7662 questions

9091 answers

14654 comments

12050 members

0 votes
1,668 views 4 comments
by
Hi,

I want to configure multiple RUT240 with almost identical settings. The only settings that will be different for every device are its password, as well as configuring a static IP address for a connected device (identified through its MAC address).

Is it possible to change the default password via SSH or HTTP and how?

How can I configure the static IP address for the connected device through SSH or HTTP?

Is there any API that I can use or another recommended way on how I can quickly and simply configure multiple RUT240s?

1 Answer

0 votes
by

Hi,

Configure one RUT240 router in accordance with your needs. Then go to the System → Administration → Backup page and download the Backup archive. (more info here).

You can then upload the Backup archive to your other routers and their configurations will be identical.

However, you will have to set the static IP and password for each router separately.

You can change the password from the System → Administration → General page. Or if you prefer SSH, you can use the passwd command to change the router's password.

When you say static IP, do you mean LAN IP or WAN IP?

  • LAN IP can be set in the Network → LAN page.
  • WAN IP can be set in the Network → WAN page, by clicking the "Edit" button next to Wired WAN. In the next page, set protocol to "Static" and set up your IP.
by
Thank you for your answer. Do you happen to know the commands I need to use or URL I've got to call to set the password via SSH or HTTP? Same goes for setting the IP on LAN over SSH or HTTPS.
by

SSH commands to change the LAN IP:

uci set network.lan.ipaddr='new_ip'
uci commit
/etc/init.d/network restart

UCI is used to set parameters on the router's OS. There's some more detailed information on that here.

You can also change parameters via JSON-RPC. There's an example on how to change the LAN IP here.

However, changing the password will be more difficult, since you are prompted by the command to enter the new password and confirm it. There's good documentation on the passwd command here.

by

Unfortunatly backing up my configuration and flashing it on another router does not work, as they must have the same product code and firmware. Not all routers are delievered with the same firmware.

by
Hi there. I k ow this post is old, but I wanted to turn your attention to OpenWISP. It allows for centralised co figuration of devices running OpenWRT. I am using it to centrally provision a customer's large network of Teltonika devices.