FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
326 views 3 comments
by anonymous
For those of us who don't have access to an FTP server to have traffic logs written to could it be possible in future to configure traffic logging to write to a connected USB drive and or could it be possible in future to have a mobile app and or a client side program installable on a windows PC / desktop so that logs could be sent to the mobile app and or laptop/desktop pc for viewing in real time and or saved for analysis later.

Draytek do this, the router can write to a connected USB drive and simultaneously send logs to a specific local PC or a remote PC via a VPN tunnel.

Ah! Just had a thought is this one of the benefits of subscribing for the RMS service!?

1 Answer

0 votes
by anonymous

Hello,

If you want to save logs to a USB flash drive, there a couple of things you can do.

You can use the following command:

  • logread -f >> /mnt/sda1/logfile.txt &

This command will log continuously into the logfile.txt file on the flash drive. You can add this command to System -> Custom Scripts above 'exit 0' to start automatically on device reboot.

Alternatively, you can create a simple script to copy the logs.db to a a flash drive and schedule it to run periodically using crontabs. This logs database does not include all the information though, so the fist method is probably better for your purposes. Anyways, the logs database is located in the /log/log.db file, and you can copy it to the flash drive by executing the command: "cp /log/log.db /mnt/sda1/logs.db". 

Regarding the application on your end devices, there are various third-party options available for receiving logs. So I would suggest exploring those. You can even use Hercules on your PC to receive, view and store logs in a file. To do this, run the Hercules server on your chosen port and enable the option to save logs into a file. You can accomplish this by right-clicking on the received data window and selecting "log to file." Configure System -> Administration -> Troubleshoot to send logs to your Hercules server.

Kind Regards,

Andzej

by anonymous

Thank you Andzej for your answer.

The command logread -f >> /mnt/sda1/logfile.txt & worked, however it hasn't given me what i was hoping for / expecting!

I was hoping for traffic logs insofar as i was expecting information detailing which local devices (Ip address and or MAC) were accessing what online, such as ip addresses / services etc.  The file is updated at EOF rather than at the top!!

If an employee is doing something online via this router that they shouldn't be, i want it logging so that the employee can be identified

by anonymous

Hello,

Apologies for the confusion earlier.

You have the option to enable traffic logging and leave the server address field empty. The logs for the br-lan (lan+wifi) will be generated and stored in the following file:

  • /var/log/ulogd_wifi.log

To view these logs, you can use the following command:

  • cat /var/log/ulogd_wifi.log

If it is something that you wish to keep, you can save them to your flash drive using a method similar to the one I described earlier for the log.db file (periodically copying it to the flashdrive using Crontabs).

Alternatively, you can use the following command to continuously monitor and display the live logs:

  • tail -f /var/log/ulogd_wifi.log

This command functions similarly to 'logread -f' and allows you to observe the logs in real-time.

Kind Regards,

by anonymous

Again thank you Andzej,

The command tail -f /var/log/ulogd_wifi.log works for me perfectly, as it's something i will need to use infrequently (i hope) when it becomes apparent that an unauthorized device is being used without permission, someone's shared the wifi password with someone they shouldn't have done or if it's become apparent that someone or an employee is spending far too much time not working in works time online etc.

Thank you.