Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
17.7 Legacy Series
»
Simple ping & reboot if no ping method every 3min?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Simple ping & reboot if no ping method every 3min? (Read 4296 times)
ckishappy
Newbie
Posts: 34
Karma: 2
Simple ping & reboot if no ping method every 3min?
«
on:
November 27, 2017, 10:54:38 am »
Hi, what is the most simple script/method with OPNsense to check every 3min if the ping to an IP is possible and if not, that the whole systems gets rebooted? This is for a remote router w/ovpn with not so reliable internet WAN connection.. Please advise.
Logged
phoenix
Hero Member
Posts: 545
Karma: 58
Re: Simple ping & reboot if no ping method every 3min?
«
Reply #1 on:
November 27, 2017, 02:01:54 pm »
I don't know if this will do what you want but there's a script I posted a while ago that restarts the WAN interface if there's no response, you might need to modify it to your requirements but it's in this thread:
https://forum.opnsense.org/index.php?topic=5511.0
Logged
Regards
Bill
Oxygen61
Sr. Member
Posts: 350
Karma: 32
Der Weg zum Erfolg hat keine Abkürzung - (Tanaka)
Re: Simple ping & reboot if no ping method every 3min?
«
Reply #2 on:
November 28, 2017, 10:43:43 pm »
I may don't see the bigger picture but isn't the "apinger daemon" based on monitoring and checking all the Gateway IP addresses for latency/Packet loss and member down events?
Why do you use a script if apinger is renewing the WAN interface anyway with "rc.newwanip"?
You can change the behaviour of apinger in the GUI by changing the gateway monitoring settings.
Maybe that could help to change the behaviour to check more often and reload the WAN interface whenever "member down" events happen in any case.
Indeed this would not reboot the Firewall by any chance, but reloading the WAN interface should be enough anyway.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
17.7 Legacy Series
»
Simple ping & reboot if no ping method every 3min?