Turning on Email Notifications in pfSense

Over the last few days I was trying to VPN into the pfSense firewall that I had setup a dual WAN on.  For some reason I wasn’t able to, but the school never sent a complaint that something was wrong with the internet.  It turns out the modem had crashed and needed a reboot (Ahh Comcast…), but the second internet connection prevented anyone from knowing that.

image

Packet loss showing how long the connection had been down for

To prevent this from happening again, I finally turned on email notifications to get an alert the next time the gateway went down.

How to

From the pfSense dashboard, click on System -> Advanced, then Notifications.

pfSensemenunotifications.png

Scroll down to E-Mail and fill in the fields using your own email addresses and passwords:

pfSensesmtpnotifications.png

I made all three email addresses from the same account I use for things like this.  I wasn’t sure how if this would work, but the test email went through just fine so no need to get fancy.  Make sure you press Save at the bottom since the Test SMTP Settings button uses the saved settings and not what is entered in the fields.

Shortcomings

As discussed in the pfSense forum, this only sends notifications that you would receive if you were logged in, and there isn’t an easy way to choose what goes through.  Lucky for me, it will send me a notification if one of the WAN gateways goes down (hopefully through the other WAN connection).  This should let me know to login and reboot the router from the Comcast online portal and fix it faster.

Sample Log

Below is a sample of the email report I received at 6:00 AM local time.  You can see that most of the activity took place at 1:43 PM when the WAN connection came back up and 4:23 PM when I VPN’d into the firewall.

This is a periodic report from your firewall, pfSense.localdomain.

Current report: Daily Report

Log output: System (system.log)
Nov 30 13:43:47 pfSense check_reload_status: Reloading filter
Nov 30 13:43:47 pfSense php-fpm[20755]: /rc.newwanip: Creating rrd update script
Nov 30 13:43:47 pfSense kernel: ovpns1: link state changed to UP
Nov 30 13:43:47 pfSense check_reload_status: rc.newwanip starting ovpns1
Nov 30 13:43:47 pfSense php-fpm[52170]: /rc.newwanip: Creating rrd update script
Nov 30 13:43:48 pfSense xinetd[26042]: Starting reconfiguration
Nov 30 13:43:48 pfSense xinetd[26042]: Swapping defaults
Nov 30 13:43:48 pfSense xinetd[26042]: readjusting service 6969-udp
Nov 30 13:43:48 pfSense xinetd[26042]: Reconfigured: new=0 old=1 dropped=0 (services)
Nov 30 13:43:49 pfSense php-fpm[49687]: /rc.newwanip: rc.newwanip: Info: starting on ovpns1.
Nov 30 13:43:49 pfSense php-fpm[49687]: /rc.newwanip: rc.newwanip: on (IP address: 192.168.41.1) (interface: []) (real interface: ovpns1).
Nov 30 13:43:49 pfSense php-fpm[49687]: /rc.newwanip: rc.newwanip called with empty interface.
Nov 30 13:43:49 pfSense check_reload_status: Reloading filter
Nov 30 13:43:49 pfSense php-fpm[49687]: /rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection -  ->  192.168.41.1 - Restarting packages.
Nov 30 13:43:49 pfSense check_reload_status: Starting packages
Nov 30 13:43:49 pfSense xinetd[26042]: Starting reconfiguration
Nov 30 13:43:49 pfSense xinetd[26042]: Swapping defaults
Nov 30 13:43:49 pfSense xinetd[26042]: readjusting service 6969-udp
Nov 30 13:43:49 pfSense xinetd[26042]: Reconfigured: new=0 old=1 dropped=0 (services)
Nov 30 13:43:49 pfSense php-fpm[20755]: /rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection - HIDDEN_IP ->  HIDDEN_IP - Restarting packages.
Nov 30 13:43:49 pfSense check_reload_status: Starting packages
Nov 30 13:43:50 pfSense php-fpm[52170]: /rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection - HIDDEN_IP ->  HIDDEN_IP - Restarting packages.
Nov 30 13:43:50 pfSense check_reload_status: Starting packages
Nov 30 13:43:50 pfSense php-fpm[52170]: /rc.start_packages: Restarting/Starting all packages.
Nov 30 13:43:50 pfSense php-fpm[52170]: /rc.start_packages: Restarting/Starting all packages.
Nov 30 13:43:51 pfSense php-fpm[52170]: /rc.start_packages: Restarting/Starting all packages.
Nov 30 15:36:08 pfSense php-fpm: /index.php: Session timed out for user 'admin' from: 192.168.41.6
Nov 30 15:36:12 pfSense php-fpm: /index.php: Successful login for user 'admin' from: 192.168.41.6
Nov 30 15:49:16 pfSense check_reload_status: Syncing firewall
Nov 30 15:49:18 pfSense php-fpm[45038]: /system_advanced_notifications.php: Could not send the message to HIDDEN_EMAIL -- Error: 530-5.5.1 Authentication Required. Learn more at
Nov 30 15:49:28 pfSense check_reload_status: Syncing firewall
Nov 30 15:49:34 pfSense php-fpm[45038]: /system_advanced_notifications.php: Message sent to HIDDEN_EMAIL OK
Nov 30 16:23:12 pfSense check_reload_status: Syncing firewall
Nov 30 16:23:18 pfSense check_reload_status: Syncing firewall
Nov 30 16:23:19 pfSense php: /etc/rc.packages: Beginning package installation for OpenVPN Client Export Utility .
Nov 30 16:23:19 pfSense check_reload_status: Syncing firewall
Nov 30 16:23:20 pfSense check_reload_status: Syncing firewall
Nov 30 16:23:20 pfSense php: /etc/rc.packages: Successfully installed package: OpenVPN Client Export Utility.
Nov 30 16:23:20 pfSense pkg: pfSense-pkg-openvpn-client-export upgraded: 1.3.11 -> 1.3.13
Nov 30 16:23:21 pfSense check_reload_status: Reloading filter
Nov 30 16:23:21 pfSense check_reload_status: Starting packages
Nov 30 16:23:22 pfSense xinetd[26042]: Starting reconfiguration
Nov 30 16:23:22 pfSense xinetd[26042]: Swapping defaults
Nov 30 16:23:22 pfSense xinetd[26042]: readjusting service 6969-udp
Nov 30 16:23:22 pfSense xinetd[26042]: Reconfigured: new=0 old=1 dropped=0 (services)
Nov 30 16:23:23 pfSense php-fpm[30978]: /rc.start_packages: Restarting/Starting all packages.
Dec  1 01:01:00 pfSense php-cgi: rc.dyndns.update: phpDynDNS (HIDDEN_DYN_DNS): No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry.
Dec  1 01:01:01 pfSense php-cgi: rc.dyndns.update: phpDynDNS (HIDDEN_DYN_DNS): No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry.
Dec  1 03:01:00 pfSense root: rc.update_bogons.sh is starting up.
Dec  1 03:01:00 pfSense root: rc.update_bogons.sh is sleeping for 62525

Sources

This is a fairly simple setup and the two resources I used are:

ByteSizedAlex

and

Calvin Bui

Posted in pfSense
0 comments on “Turning on Email Notifications in pfSense
1 Pings/Trackbacks for "Turning on Email Notifications in pfSense"
  1. […] Turning on Email Notifications in pfSense […]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

12 + 18 =