Netgate Store

Author Topic: Report of network traffic by email  (Read 619 times)

0 Members and 1 Guest are viewing this topic.

Offline jopeme

  • Full Member
  • ***
  • Posts: 137
  • Karma: +1/-0
    • View Profile
Report of network traffic by email
« on: November 20, 2017, 02:45:49 pm »
Is there a package that reports network traffic and send them by email? I have installed ntopng 3.0 but i don't find this option.Lightsquid does not have this option. I use squid + squidguard + captive portal and i have several vlans configured on my pfsense 2.4


Offline highc

  • Jr. Member
  • **
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: Report of network traffic by email
« Reply #1 on: December 30, 2017, 11:44:39 am »
You can do this with vnstat (the Status_Traffic_Totals package) and the mailreport package.

Install both, get vnstat going, and then under Status -> Email reports add a line that will mail you regularly (e.g., daily at midnight) the output of the commands

Code: [Select]
/usr/local/bin/vnstat -i pppoe0; /usr/local/bin/vnstat -i pppoe0 -h
which in this case would be the statistics for the pppoe0 interface.

For mailreport to work, you need to have setup System -> Advanced -> Notifications (the SMTP part there).
pfSense 2.4.2-RELEASE-p1 on Netgate SG-2440