The Asus router reboot script

On old router firmware Asus often noticed that the web interface is not fully open, not all the menus are displayed, so it can not be configured accordingly and can not be restarted if remote access is also available, since the reset button is not displayed.
So he took the Asus RT-N12E router, ran the Wireshark sniffer, opened the web interface of the router and pressed the reboot button.
In the intercepted packets, you could see that the Reboot.asp file is being rebooted in the root directory.

This resulted in a script for rebooting Asus routers:


# exit if router is down
ping -q -c 1 "$ROUTER_IP" > /dev/null || exit

curl --basic --user "$USERNAME:$PASSWORD" -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" --refer "http://$ROUTER_IP" "$ROUTER_IP/Reboot.asp"

The contents of the script will be placed in a new file, for example, using the nano editor (“CTRL+X” to exit and “y” to save the changes):


Let’s make it executable:

chmod 777

After this, we execute:


You can also manually open the link in the browser if you need to reboot the router once.

How to upgrade the Firmware of the ASUS RT-N12E Router

In order to update the firmware of the Asus RT-N12E router, you need to enter its settings by typing in the browser address and enter your login – admin, password – admin, see the firmware version that is installed, usually it is written at the very top, for example “Firmware version:”.

Check for a new version of the firmware on the official site and if it is there to download it:

Next, open the menu “Administration“, select a tab “Firmware Upgrade“, press “Browse” and select the firmware file, click “Send” and wait for the update process to complete.

The configuration of the router remains unchanged.
If the update fails, the router can be restored using a utility that can also be downloaded from the link above.