I‘m using a Cisco Linksys WAG320N Router to connect my OS X UNIX and Linux systems to the Web. How do I reboot my Linksys WAG series router / gateway (modem) from UNIX / Linux / OS X bash command prompt or using a shell script?
The Cisco linksys series modem removed reboot option from its web interface but you can reboot the router using the following url format:
The web interface hack works with any web browser regardless of the operating system.
Command Line Options
curl is a command line tool for transferring data with URL syntax, supporting various protocosl such as FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTMP and RTSP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos), file transfer resume, proxy tunneling and much more. The same tool can be used to reboot your router as follows:
curl -u 'Router-username:password' 'http://192.168.1.1/setup.cgi?todo=reboot' curl -u 'admin:Your-Password-Here' 'http://192.168.1.1/setup.cgi?todo=reboot'
Share this tutorial on: