This is a super simple bash script that will ping Googles DNS servers every 10 minutes and if there is no response, try an interface down/up before it rebooting the machine.
NOTE:
You will probably need to update the script where it says igc0 with your WAN interfaces name (you can find this easily through the GUI or by running ifconfig).
- Copy the ping_check.sh file to /usr/local/etc/rc.d
- Make it executable with chmod 755 ping_check.sh