Emails from DD-WRT Posible?

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
robertdaleweir
DD-WRT User


Joined: 14 Apr 2018
Posts: 75

PostPosted: Mon Nov 15, 2021 22:26    Post subject: Emails from DD-WRT Posible? Reply with quote
Hi
I wanted to know if it is possible to get logs Emailed from the Router? If this is a silly question I have no problem removing it. I wanted to scan my Router Logs and the only reasonable method would be if an Email could be issued to my email address and I could parse them. I understand this could be considered a security threat but how else could I get the logs so I can scan them regularly?
Thanks ...
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Mon Nov 15, 2021 22:59    Post subject: Reply with quote
You can use a remote log server. The only "logs" I know of that can be emailed from the firmware are the connection warning notifications.

https://wiki.dd-wrt.com/wiki/index.php/Logs

I haven't found any forum threads regarding some kind of script that does this, but it would be great to have logrotate shift them daily and email a copy. If I find something, I will try to come back and post.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
robertdaleweir
DD-WRT User


Joined: 14 Apr 2018
Posts: 75

PostPosted: Tue Nov 16, 2021 3:08    Post subject: Reply with quote
[quote="kernel-panic69"]You can use a remote log server. The only "logs" I know of that can be emailed from the firmware are the connection warning notifications.

https://wiki.dd-wrt.com/wiki/index.php/Logs

I haven't found any forum threads regarding some kind of script that does this, but it would be great to have logrotate shift them daily and email a copy. If I find something, I will try to come back and post.[/quote

Hi kernel-panic69
Thanks for your post. Are you aware of how the 'remote log server' can be established. I would like to try that and see what I can get from it.
Robert
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Thu Nov 18, 2021 2:17    Post subject: Reply with quote
I get an email from dd-wrt when any entware packages need updating which lists the out of date packages.

The easyddup utility has a "new dd-wrt version notification" email feature. You could copy the email stuff from easyddup, parse /var/log/messages and email yourself the result.
robertdaleweir
DD-WRT User


Joined: 14 Apr 2018
Posts: 75

PostPosted: Thu Nov 18, 2021 4:18    Post subject: Reply with quote
yoyoma2 wrote:
I get an email from dd-wrt when any entware packages need updating which lists the out of date packages.

The easyddup utility has a "new dd-wrt version notification" email feature. You could copy the email stuff from easyddup, parse /var/log/messages and email yourself the result.


Hi yoyoma2
So you get an email from your router notifying you that certain packages aree out of date. What version of the Firmware are you using and did you have to st it up in settings to get it to issue an Email from the unit?
I looked at the conversation on https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=322503&sid=e73526754dff1b6492f01fa2ac6d06d6
and it is interesting. Thanks for that information ...
Robert
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Thu Nov 18, 2021 14:45    Post subject: Reply with quote
If you want to run custom scripts to filter and email your logs, it's best to plug a USB stick to store your scripts. The dd-wrt filesystems are read-only except /tmp which is in RAM and lost on reboot. There's also NVRAM based jffs but I don't like using precious NVRAM for that.

The easyddup utility (1st post of the thread you linked to) is a couple custom scripts that includes checknewversion.sh which would be a good starting point for your mailmylogs.sh script. A couple of tweaked lines and you'd have what you want.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Thu Nov 18, 2021 18:14    Post subject: Reply with quote
JFFS is unused flash space, not NVRAM space.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Thu Nov 18, 2021 19:35    Post subject: Reply with quote
Thanks for the correction. The point is use a USB stick.
robertdaleweir
DD-WRT User


Joined: 14 Apr 2018
Posts: 75

PostPosted: Sat Nov 20, 2021 0:51    Post subject: Reply with quote
yoyoma2 wrote:
If you want to run custom scripts to filter and email your logs, it's best to plug a USB stick to store your scripts. The dd-wrt filesystems are read-only except /tmp which is in RAM and lost on reboot. There's also NVRAM based jffs but I don't like using precious NVRAM for that.

The easyddup utility (1st post of the thread you linked to) is a couple custom scripts that includes checknewversion.sh which would be a good starting point for your mailmylogs.sh script. A couple of tweaked lines and you'd have what you want.


yoyoma2

OK. I have never tried to connect anything using a USB stick but I will see how that works. I will download the 'easyddup' and have a look at the scripts. Thanks so much for your post ...
Robert
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum