OPNsense Forum

Archive => 24.1, 24.4 Legacy Series => Topic started by: MarekWojtaszek on May 18, 2024, 09:53:42 PM

Title: Ping monit does not work
Post by: MarekWojtaszek on May 18, 2024, 09:53:42 PM
I am trying to use Services \ Monit to monitor whether my two gateways are up.
So I created a Test setup which looks like this:

failed ping4 count 5 address 192.168.101.1
failed ping4 count 5 address 192.168.102.1

Unfortunately, they are failing for whatever reason ('ICMP failed').

When I put any router's (OPNsense's) IP, for example 192.168.131.1 (LAN), 192.168.101.2 (WAN),  192.168.102.2 (WAN2), 172.16.0.1 (firewall's virtual IP) - the status is 'OK' (pings are responding).

But when I change it to any IPs that is outside of the firewall machine (any internet host like 8.8.8.8 or 8.8.4.4), the gateways (192.168.101.1, 192.168.101.2) or any IPs inside my network (192.168.131.0/24)-- the status is always 'ICMP failed'

I don't understand why as all of those IPs are perfectly pingable from the OPNsense's SSH.
It does not seem to be blocked by the firewall rule either (I found nothing in the firewall logs).

The logs say something like this:
2024-05-18T21:37:49 Error monit 'Monitor_Mobile_Gateway' ping test failed
2024-05-18T21:37:49 Error monit Cannot bind to outgoing address -- Can't assign requested address


Any ideas what can be wrong there?
Title: Re: Ping monit does not work
Post by: randys480 on July 17, 2025, 05:22:45 AM
Sorry just came across this post. The address in the Services Test Settings must exist locally for monit to "bind" to.
failed ping4 count 5 address 192.168.101.1
failed ping4 count 5 address 192.168.102.1
The Service Settings are where you duplicate your tests and change the remote ip that you are testing.  Even clicking the help button is not super clear on this.