Detect when a WAN is down (does not have internet access) to launch a script?
-
Hello
I want to know how I can detect when a WAN is down (down meaning it has no internet access thru that interface) and then if detected, launch a personal script.
Thanks
-
You something like this
https://forum.netgate.com/topic/124545/monitoring-pfsense-using-nagios-and-ssh
Or a bash script like this .....
if curl -s --head --request GET https://example.com | grep "200 OK" > /dev/null; then echo "mysite.com is UP" else echo "mysite.com is DOWN" fi
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.