From 21b2fcb16c240bf5b02c45f217e47c25745eb96a Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Wed, 26 Jun 2024 12:01:17 +0200 Subject: [PATCH] nagios-nrpe: set bind IP to 127.0.0.1 in monitoringctl for NRPEs that are configured to listen on a specific IP but this IP is not in allowed_hosts --- nagios-nrpe/files/monitoringctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios-nrpe/files/monitoringctl b/nagios-nrpe/files/monitoringctl index 46e4776b..6871c214 100755 --- a/nagios-nrpe/files/monitoringctl +++ b/nagios-nrpe/files/monitoringctl @@ -126,7 +126,7 @@ function check() { fi if [ "${bypass_nrpe}" = "False" ]; then - request_command="${check_nrpe_bin} -H ${server_address} -p ${server_port} -c check_${check} 2&>1" + request_command="${check_nrpe_bin} -H ${server_address} -p ${server_port} -b 127.0.0.1 -c check_${check} 2&>1" else if [ -n "${check_command}" ]; then request_command="sudo -u nagios -- ${check_command}"