Remotely restart FIOS (MI424WR) Router
Arouet
Newbie

My router frequently slows speeds to a crawl or stops working. 

Does the router have an easy way to do this, or has anyone came up with a script to: automatically login remotely to reboot the router?

The router doens't have SSH and I refuse to use telnet. I'm gonna try to use linux/curl to script the behavior of logging in and clicking the reboot router link. 

0 Likes
Re: Remotely restarted FIOS (MI424WR) Router
dslr595148
Community Leader
Community Leader

#1 What is the exact hardware version of this router?

For example rev C.

#2 This router does not have UPnP turned on ( some where in Advanced ) ?

#3 What firmware does your router use (some where in Advanced ) ?

0 Likes
Re: Remotely restart FIOS (MI424WR) Router
watice
Enthusiast - Level 3

Having the same issue as you, router (AT, Rev. I)will occasionally slow to a crawl & require a reboot. Have you made any progress on a script? If not, I'd be willing to write one as it would solve my issues as well, maybe this weekend.

0 Likes
Re: Remotely restart FIOS (MI424WR) Router
Hubrisnxs
Legend

What's wrong with setting up Remote Administration in the advaned menu???

0 Likes
Re: Remotely restart FIOS (MI424WR) Router
viafax999
Community Leader
Community Leader

@Arouet wrote:

My router frequently slows speeds to a crawl or stops working. 

Does the router have an easy way to do this, or has anyone came up with a script to: automatically login remotely to reboot the router?

The router doens't have SSH and I refuse to use telnet. I'm gonna try to use linux/curl to script the behavior of logging in and clicking the reboot router link. 


port forward ssh to an internal machine and then remotely access the machine and reboot the router from the inside.

far safer than enabling remote admin on the router

0 Likes
Re: Remotely restart FIOS (MI424WR) Router - Instructions to reboot actiontec router every night
strouli
Enthusiast - Level 2

I have the same problem and have to reboot my gen 3 actiontec router every few days as my upload speeds come to a crawl, oddly download speeds are fine.   So here is what I ended up doing.  This is from a Windows 7 64 bit PC and this automtically reboots the fios actiontec gen 3 router every night.  The PC that runs this script needs to be powered on at the time this script runs.

1) Enabled Telent Access for Local Access Only (that means while only on my local network).  I did  this by

a) login with browser to 192.168.1.1 with admin id and password

b) Go to Advanced .. Local Administration ....  Allow local telnet access ... Using Primary Telnet Port (23)

2) Download Telnet Scripting Tool a.k.a TST10.exe from http://www.theworldsend.net/download.php?get=TST10&extension=zip

3) I unziped this download and placed the file TST10.exe file from the  TST10.zip in this directory

"F:\My Documents-James\Dropbox\Dropbox\reboot-router"

4) I enabled Telnet  Client on the Windows 7 PC I am running this from by turing on the telnet client windows feature
. Here is how to do that

http://social.technet.microsoft.com/wiki/contents/articles/910.how-to-enable-telnet-client-in-window...

5) I created this script and called it "reboot-router.txt"  and placed in the same folder as the tst10.exe program.  Here are the exact contents of this file, except replace "admin" with the administrator  id if you changed it on your router (I did) and place the password for this admin id (fios admin password) on the 5th line of the script

192.168.1.1
WAIT "Username:"
SEND "admin\m"
WAIT "Password:"
SEND "enteryouradminpassswordhere\m"
WAIT ">"
SEND "system reboot\m"
WAIT ">"

6) Now from a command prompt I would run this command

tst10.exe /r:reboot-router.txt

This would reboot the router.  Now the challenge was to get this program to run automatically with "parameters" via windows scheduler.  I could not get that to work for some reason via the add arguments.  So I had to create a batch file.

7) Create a batch file called "reboot-router.bat" and I placed it in the same folder with the .txt file and .exe file

"F:\My Documents-James\Dropbox\Dropbox\reboot-router".  Here are the exact contents of this .bat file. 

title reboot router
F:
cd "F:\My Documents-James\Dropbox\Dropbox\reboot-router"
@echo:
sleep 2
tst10.exe /r:reboot-router.txt /o:output.txt /m
@echo:

😎 Create a windows task to run every day at 4 am to run this reboot-router.bat file.  Here is how I did that

a)Right Click My Computer from desktop ....

b) Click Manage (to be at Computer Management) ...

c) Click Task Scheduler under System tools

d) Under actions on right side click "Create a basic task"

e) give it a name such as reboot router..

f) click Next

g) Keep Daily radio button checked and click Next

h) select the time you want to have this run and keep other defaults of recur every day "1"  and Start date

i) Select "Start a program"  for "What actions do you want the task to perform"

j) For Program or Script click the browse button and point it to reboot-router.bat

in my case it was "F:\My Documents-James\Dropbox\Dropbox\reboot-router\reboot-router.bat"

k) click Next

l) give it name

9) You are now done!!!!

I tested this at step 6 to make sure I had everything working

Good luck to everyone, James Stroud

Re: Remotely restart FIOS (MI424WR) Router - Instructions to reboot actiontec router every night
BillBFC
Enthusiast - Level 2

To reboot a Verizon MI424WR router remotely from a Raspberry Pi on the same internal network, here's what to do:

Log into the pi account on the Raspberry Pi.

Download and install the expect application. Enter this command at the Raspberry Pi's prompt:

sudo apt-get install expect

Create the following expect script in the /home/pi directory and name it verizonrouterreboot.expect

# This expect script will connect by telnet with a local Verizon router
# and command it to reboot.
# It has been tested on an MI424WR Revision I with the latest stock firmware
# as of 2014-01-16, Version 40.21.10.2.
# The Verizon router must have telnet access enabled for local administration
# using port 23.

# Be sure to enclose any text below after expect or send in double
# quotation marks, and if you need to send a return, end the text with \r.

# Open a telnet session with the Verizon router.
spawn telnet 192.168.1.1

# Log in to the Verizon router.
# Replace yourverizonrouterpassword with the admin password on your Verizon router.
# Retain the \r after the admin password.

expect "Username:"
send "admin\r"
expect "Password:"
send "yourverizonrouterpassword\r"

# Wait for a prompt. Adjust as needed to match the actual prompt
# on your router.
expect "Wireless Broadband Router> "

# Probably no need to delay after receiving a prompt, but just in case.
sleep 5

# Command the Verizon router to reboot.
send "system reboot\r"

# Wait 5 seconds and close the telnet connection to the Verizon router. This is
# probably not necessary because the router reboot should close the connection.
sleep 5
send "exit\r"

# Close the spawned telnet session on the Raspberry Pi. This may not be
# necessary either because the router reboot or the exit above may do this.
close

# Wait 5 more seconds before exiting from expect in case any commands need
# time to complete.
sleep 5

# Exit from expect.
exit

Create the following shell script in the /home/pi directory and name it verizonrouterreboot.sh. Don't omit the curly braces at the top and at the beginning of the next-to-last line.

{
# This shell script starts expect on a Raspberry Pi and runs an expect script
# to reboot a Verizon FiOS Actiontec MI424WR Revision I router. Please see the
# expect script for details.
# The expect script must be in the same directory as this shell script,
# or you can insert the path to the expect script.

cd /home/pi
expect -f verizonrouterreboot.expect

# Insert a hard return when expect ends to get a new Raspberry Pi prompt
# on a new line.
echo "\r"

# The log file won't tell you much, but its creation time will tell you
# when the script ran and this can be useful if you start it from cron.

} 2>&1 > /home/pi/verizonrouterreboot.log
exit

Make sure you are in the /home/pi directory. Enter the following at a shell prompt to reboot the router:

sh verizonrouterreboot.sh

My router takes about two minutes to reboot.

If you want to add an automatic reboot to the Raspberry Pi's cron, make sure you are logged in as pi and enter this at the prompt:

crontab -e

 

The nano text editor will open a temporary file. Add this to the bottom of the file:

0 0 * * * /home/pi/verizonrouterreboot.sh

The crontab entry above will reboot the router every day at 12 midnight. See documentation for crontab if you want to do this on different days or at different times. A web search for "man crontab" without the quotes will find this documentation.

When you finish making modifications to the file in nano, press CTRL-X, answer "yes" when it asks if you want to save the modified buffer, and the reboot job will be added to cron.

If you don't like the long names all in lower case I have used for the scripts and files, like "verizonrouterreboot", feel free to change them, but be careful to change them everywhere.

Re: Remotely restart FIOS (MI424WR) Router - Instructions to reboot actiontec router every night
BillBFC
Enthusiast - Level 2

I forgot to mention that you need to make the shell script executable. After you create and save it and before you run it the first time, enter this command at the prompt:

chmod a+x verizonrouterreboot.sh

You may need to do the same for the expect script. Anyway, it won't hurt:

chmod a+x verizonrouterreboot.expect

Re: Remotely restart FIOS (MI424WR) Router
viafax999
Community Leader
Community Leader

@Arouet wrote:

My router frequently slows speeds to a crawl or stops working. 

Does the router have an easy way to do this, or has anyone came up with a script to: automatically login remotely to reboot the router?

The router doens't have SSH and I refuse to use telnet. I'm gonna try to use linux/curl to script the behavior of logging in and clicking the reboot router link. 



Are you trying to restart the router from the internet or from your intranet?

If the latter there is a reboot selection under the advanced tab - at least on my menus there is

Re: Remotely restart FIOS (MI424WR) Router
BillBFC
Enthusiast - Level 2

You only need to authorize telnet on the Verizon router for local administration from a local computer on the internal network. This will not open the router to telnet access from the internet. In a home location, this doesn't present much risk. If you use a Verizon router to provide internet access in a business or public access situation where not all of the equipment and users are trusted, opening the router to telnet access over the local network creates greater risks.

My example above assumes that the Raspberry Pi used to run the scripts to reboot the router is on the same local network as the router, and that the router has been set to allow local administration over telnet.

If you need to reboot the router automatically from another computer on the internet at a different location, you could:

- Set up a Raspberry Pi (or other computer) on the same local network as the router.

- Port forward SSH traffic from the internet through the router to the Raspberry Pi.

- Using SSH, log in to the Raspberry Pi from another computer on the internet at a separate geographic location.

- Log in to the router from the Raspberry Pi on the local network using telnet.

- Enter router commands.

All of the above could be scripted.

I use a Raspberry Pi myself and in the illustration because they are so cheap, and the savings in electricity costs compared to leaving a conventional desktop running 24x7 will probably pay for a Raspberry Pi within a year.

0 Likes