What's new

[Solved] Scheduled reboots and other log related questions

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Murtaza12

Regular Contributor
I've been running Voxel's .60SF firmware on my R7800 for a while now, it's rock solid in terms of stability, no complaints whatsoever. I probably won't upgrade unless absolutely necessary, however my new ISP has this weird thing where it drops the PPPoE connection every 24 hours, however since I'm subscribed to static IP, the IP obviously doesn't change, it just terminates the session for like 10 seconds and then reconnects.

So, since I last rebooted the router at like 1 PM, it disconnects every day at 1 PM for 10-15 seconds (sometimes longer), and then reconnects shortly after, I want this to stop happening when everyone is awake, but because of my schedule, I can't stay up till 5 AM to reboot it myself.
Is there a NOT complicated way of scheduling a reboot at 5 AM everyday? Since I have my Raspberry Pi scheduled to reboot around that time as well.


The second reason I made this thread would be these lines I've noticed in the router logs:

[DoS Attack: ACK Scan] from source: 157.240.7.53, port 5222, Thursday, October 25, 2018 20:46:37
[DoS Attack: ACK Scan] from source: 110.93.194.81, port 443, Thursday, October 25, 2018 20:41:55
[DoS Attack: TCP/UDP Chargen] from source: 188.166.63.106, port 60829, Thursday, October 25, 2018 20:35:25

Now this happens quite often, and it's always in the logs, with a bunch of different IPs, whats kinda interesting is that the one that I've made bold is an IP address from my ISP.

Is this normal? I use CloudFlare's DNS if that matters.

All replies will be appreciated.

Thanks,
murtaza12
 
Last edited:
R7800 is known as a bit "paranoid" with such reports. Try to search this forum re: DoS Attacks. Just make such minimal self-protection actions as:

Disable "Respond to Ping on Internet Port" in Advanced->WAN Setup
Disable UPnP

and ignore this. Does not matter what DNS you are using.

Voxel.
 
R7800 is known as a bit "paranoid" with such reports. Try to search this forum re: DoS Attacks. Just make such minimal self-protection actions as:

Disable "Respond to Ping on Internet Port" in Advanced->WAN Setup
Disable UPnP

and ignore this. Does not matter what DNS you are using.

Voxel.
Hey Voxel, thanks for replying.

Respond to Ping on Internet port is already disabled, and the only reason I had UPnP enabled is due to me having a gaming console (PS4) connected to the router. I'll disable it and see if it affects connectivity on the console in any way.
 
You can create your own cron job to do that.
The easy way for you is to add the following line to /etc/rc.local
Code:
mkdir -p /opt/tmp/mycron/crontabs && echo "00 05 * * * reboot" >/opt/tmp/mycron/crontabs/root && crond -c /opt/tmp/mycron/crontabs -T $TZ

This should reboot your router at 5 AM every day.

Thanks.
Any advice about scheduled reboots?
 
You can create your own cron job to do that.
The easy way for you is to add the following line to /etc/rc.local
Code:
mkdir -p /opt/tmp/mycron/crontabs && echo "00 05 * * * reboot" >/opt/tmp/mycron/crontabs/root && crond -c /opt/tmp/mycron/crontabs -T $TZ

This should reboot your router at 5 AM every day.
Didn't know cron works on the R7800, I've got my Raspberry Pi's scheduled reboots also working through cron.

Thanks!
 
Some people say that cron is not working for the R7800, that you must install ssh and Entware to get it working. That is not true.

You can create your own cron job without even editing rc.local, by creating a new rc.local with these 3 commands:
Code:
echo 'mkdir -p /opt/tmp/mycron/crontabs && echo "0 5 * * * reboot" >/opt/tmp/mycron/crontabs/root && crond -c /opt/tmp/mycron/crontabs' >/etc/rc.local
echo 'exit 0' >>/etc/rc.local
reboot

You can restore your rc.local to original with this command:
Code:
\cp /rom/etc/rc.local /etc/rc.local
 
Last edited:
Thanks to instructions and help from @kamoj

I've got scheduled reboots using cron on my R7800, and it restarts every day at 5 AM thanks to this. The lines mentioned by kamoj in Post #8 work flawlessly with Voxel's .61SF firmware.
 
How to install a cron job to reboot your router once a week:

Pre-requisites:

  • A telnet client program
#1. Logon (From your web-browser):
http://www.routerlogin.net

#2. Enable Telnet:
http://www.routerlogin.net/debug.htm
Check (Set a tick in the box for) "Enable Telnet". (No apply needed)

#2. Login to the router using telnet:
Code:
telnet www.routerlogin.net

#3. Create your cron job, to reboot every monday morning at 4 am:
Code:
echo 'mkdir -p /opt/tmp/mycron/crontabs && echo "0 4 * * 1 reboot" >/opt/tmp/mycron/crontabs/root && crond -c /opt/tmp/mycron/crontabs' >/etc/rc.local
echo 'exit 0' >>/etc/rc.local
reboot

#4. You can "uninstall" the cron job by restoring your rc.local to original with this command:
Code:
\cp /rom/etc/rc.local /etc/rc.local
 
Last edited:
Router did not reboot with recommended cron job.
Did you modify the cron command to test it?

The one provided by kamoj in the post above yours is for the router to reboot every MONDAY at 4 AM.
I have a similar one, except mine reboots every day at 5 AM, and it works just fine, and it has been for the past week.
 
Yes i did for Friday at 5 am and enter the following:
echo 'mkdir -p /opt/tmp/mycron/crontabs && echo "0 5 * * 5 reboot" >/opt/tmp/mycron/crontabs/root && crond -c /opt/tmp/mycron/crontabs' >/etc/rc.local

Dont understand about 2nd and 3rd command
echo 'exit 0' >>/etc/rc.local
crond -c /opt/tmp/mycron/crontabs
 
Some people say that cron is not working for the R7800, that you must install ssh ant Entware to get it working. That is not true.

You can create your own cron job without even editing rc.local, by creating a new rc.local with these 3 commands (reboot is not needed):
Code:
echo 'mkdir -p /opt/tmp/mycron/crontabs && echo "0 5 * * * reboot" >/opt/tmp/mycron/crontabs/root && crond -c /opt/tmp/mycron/crontabs' >/etc/rc.local
echo 'exit 0' >>/etc/rc.local
crond -c /opt/tmp/mycron/crontabs

You can restore your rc.local to original with this command:
Code:
\cp /rom/etc/rc.local /etc/rc.local

Hi,

I have no knowledge of cron but have logged in using putty and telnet to the router. Tried to enter the commands from this post. error on 3rd command. What am i doing wrong? I want to reboot the router everyday at 5am.
 

Attachments

  • reboot.jpg
    reboot.jpg
    58.2 KB · Views: 525
Just reboot the router after the first 2 commands.

(I will update the instruction)

Hi,

I have no knowledge of cron but have logged in using putty and telnet to the router. Tried to enter the commands from this post. error on 3rd command. What am i doing wrong? I want to reboot the router everyday at 5am.
 
Thank you but its still not working, no reboot.
Dear Voxel, Is it possible to add "schedule reboot" as configuration option in user interface?
 
First you have to wait until 5 AM for the router to reboot.

Can you show the output from these commands, please:

Code:
cat /opt/tmp/mycron/crontabs/root
cat /etc/rc.local
ll /tmp/ntp_updated
date
date -u
which reboot
which crond
echo $TZ

Thank you but its still not working, no reboot.
Dear Voxel, Is it possible to add "schedule reboot" as configuration option in user interface?
 
Lol, i have change the time to check.
Here is the output:

root@Plumwood:/$ cat /opt/tmp/mycron/crontabs/root
31 9 * * 7 reboot
root@Plumwood:/$
root@Plumwood:/$ cat /etc/rc.local
mkdir -p /opt/tmp/mycron/crontabs && echo "31 9 * * 7 reboot" >/opt/tmp/mycron/crontabs/root && crond -c /opt/tmp/mycron
/crontabs
exit 0
root@Plumwood:/$
root@Plumwood:/$ ll /tmp/ntp_updated
-rw-r--r-- 1 root root 0 Nov 11 09:29 /tmp/ntp_updated
root@Plumwood:/$
root@Plumwood:/$ date
Sun Nov 11 10:01:22 GMT 2018
root@Plumwood:/$
root@Plumwood:/$ date -u
Sun Nov 11 16:01:36 UTC 2018
root@Plumwood:/$
root@Plumwood:/$ which reboot
/sbin/reboot
root@Plumwood:/$
root@Plumwood:/$ which crond
/usr/sbin/crond
root@Plumwood:/$
root@Plumwood:/$ echo $TZ
GMT+6GMT,M3.2.0/2:00,M11.1.0/2:00
root@Plumwood:/$
root@Plumwood:/$
 
I suggest you use "0" instead of "7" for sunday, or at least "0,7", since I'm not sure about this cron.
Next time you test, set a reboot time a little longer in the future, at least 5 minutes.
 
It works now, Tada. Thank you very much. So, reboot was required with no 3rd original command and 7 is not valid day for Sunday.
One more stupid question from newbie. The cron job will not be saved in backup configuration, Right?
 
Similar threads
Thread starter Title Forum Replies Date
D Solved Bricked RBR50 SOLVED! NETGEAR AC Routers and Adapters (Wi-Fi 5) 1

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top