Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
Email alert when WAN drops/reconnects?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Email alert when WAN drops/reconnects? (Read 3135 times)
jonf
Newbie
Posts: 23
Karma: 1
Email alert when WAN drops/reconnects?
«
on:
February 16, 2021, 01:15:32 pm »
I'd like to get an email alert from OPNsense when my WAN connection has dropped and reconnected. As a bonus it would be nice if it could also show me the new IP addresses (v4 and v6) within the email. How could I do this?
Logged
thowe
Jr. Member
Posts: 90
Karma: 11
Open Source can do a lot.
Re: Email alert when WAN drops/reconnects?
«
Reply #1 on:
February 17, 2021, 06:11:58 pm »
The simplest solution is theoretically the monit plugin. This can do exactly that. But then you have a problem: If you want to send mails over the internet when the WAN is down, this will probably not work. :-)
I have this setup. But I also have 2 different redundant WAN lines in one group. I.e. if one of the WAN lines is down, the notification is sent over the other one.
But this could help you:
Additionally I have set up an external monitoring from outside. For this I have set up a simple ping check at
https://uptimerobot.com/
(free of charge). By default your OPNsense will not respond to external pings, so the test will always be "down". Therefore you have to use a firewall rule to selectively allow ICMP packets on the WAN port for the hosts of UptimeRobot. The easiest way to do this is to set up an alias of the type URL Table (IPs), which automatically fetches the current IP addresses from UptimeRobot (they publish this!). On this alias you can then set up the WAN rule. Have a look at the screenshot.
«
Last Edit: February 17, 2021, 08:15:18 pm by thowe
»
Logged
System 1: PC Engines APU2C4
System 2: PC Engines APU2E4
System 3: Proxmox-VM on Intel NUC
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
Email alert when WAN drops/reconnects?