Linksys E4200: reboot router using bash command

Cisco Linksys E4200 (and similar) is using web interface to administer router. You can simply use shell command to reboot and renew DHCP address instead of web interface.

Type the URL of Cisco web interface into web browser

Open the page and check for javascript code in HTML source. I’d like to reboot router so I’m looking for Java Script function named “reboot”:

function reboot(F)

        F.submit_button.value = "index";
        F.change_action.value = "gozila_cgi";

Use the command curl, add admin password with ‘-u’ option and join URL of web interface with ‘apply.cgi’ script. Using POST data from Java Script function construct shell command to its final version:

$ curl -u 'admin:Your-Password-Here' '' -d "submit_button=index&change_action=gozila_cgi&submit_type=reboot"

Run this command to reboot router.

1 thought on “Linksys E4200: reboot router using bash command”

Leave a Reply

Your email address will not be published. Required fields are marked *