Yes.npolovenko wrote:@bchabotdg, Have you reset the nrpe after making changes in the nrpe.cfg file?service nrpe restart
Done that. Twice.npolovenko wrote:Try rebooting the server as well.
npolovenko wrote:Try removing the ipv6 option ::1 from the allowed_hosts as well as /22 for testing purposes, and then reset the nrpe again.
Code: Select all
# vi /usr/local/nagios/etc/nrpe.cfg
# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
# service nrpe restart
Shutting down nrpe [ OK ]
Starting nrpe [ OK ]
# /usr/local/nagios/libexec/check_nrpe -H 1.2.3.4 && tail -f /usr/local/nagios/var/nrpe.log
NRPE v3.2.1
[1535126185] is_an_allowed_host (AF_INET): is host >1.2.3.4< an allowed host >1.2.3.4<
[1535126185] Host 1.2.3.4 is not allowed to talk to us!
[1535126185] Connection from 1.2.3.4 closed.
[1535126219] CONN_CHECK_PEER: checking if host is allowed: 1.2.3.4 port 22153
[1535126219] Connection from 1.2.3.4 port 22153
[1535126219] is_an_allowed_host (AF_INET): is host >1.2.3.4< an allowed host >1.2.3.4<
[1535126219] Host 1.2.3.4 is not allowed to talk to us!
[1535126219] Connection from 1.2.3.4 closed.
[1535126228] Caught SIGTERM - shutting down...
[1535126228] Daemon shutdown
^C
# /usr/local/nagios/libexec/check_nrpe -H localhost && tail -f /usr/local/nagios/var/nrpe.log
CHECK_NRPE: Error - Could not connect to ::ffff:ffff:ffff:ffff: Connection reset by peer
# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 && tail -f /usr/local/nagios/var/nrpe.log
NRPE v3.2.1
[1535126185] is_an_allowed_host (AF_INET): is host >1.2.3.4< an allowed host >1.2.3.4<
[1535126185] Host 1.2.3.4 is not allowed to talk to us!
[1535126185] Connection from 1.2.3.4 closed.
[1535126219] CONN_CHECK_PEER: checking if host is allowed: 1.2.3.4 port 22153
[1535126219] Connection from 1.2.3.4 port 22153
[1535126219] is_an_allowed_host (AF_INET): is host >1.2.3.4< an allowed host >1.2.3.4<
[1535126219] Host 1.2.3.4 is not allowed to talk to us!
[1535126219] Connection from 1.2.3.4 closed.
[1535126228] Caught SIGTERM - shutting down...
[1535126228] Daemon shutdown
^C
# /usr/local/nagios/libexec/check_nrpe -H host.domain.local && tail -f /usr/local/nagios/var/nrpe.log
NRPE v3.2.1
[1535126185] is_an_allowed_host (AF_INET): is host >1.2.3.4< an allowed host >1.2.3.4<
[1535126185] Host 1.2.3.4 is not allowed to talk to us!
[1535126185] Connection from 1.2.3.4 closed.
[1535126219] CONN_CHECK_PEER: checking if host is allowed: 1.2.3.4 port 22153
[1535126219] Connection from 1.2.3.4 port 22153
[1535126219] is_an_allowed_host (AF_INET): is host >1.2.3.4< an allowed host >1.2.3.4<
[1535126219] Host 1.2.3.4 is not allowed to talk to us!
[1535126219] Connection from 1.2.3.4 closed.
[1535126228] Caught SIGTERM - shutting down...
[1535126228] Daemon shutdown
^C
#
Added the /22:
Code: Select all
# vi /usr/local/nagios/etc/nrpe.cfg
# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
# service nrpe restart
Shutting down nrpe [ OK ]
Starting nrpe [ OK ]
# /usr/local/nagios/libexec/check_nrpe -H 1.2.3.4 && tail -f /usr/local/nagios/var/nrpe.log
CHECK_NRPE: Error - Could not connect to 1.2.3.4: Connection reset by peer
# /usr/local/nagios/libexec/check_nrpe -H localhost && tail -f /usr/local/nagios/var/nrpe.log
CHECK_NRPE: Error - Could not connect to ::ffff:ffff:ffff:ffff: Connection reset by peer
# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 && tail -f /usr/local/nagios/var/nrpe.log
NRPE v3.2.1
[1535126185] is_an_allowed_host (AF_INET): is host >1.2.3.4< an allowed host >1.2.3.4<
[1535126185] Host 1.2.3.4 is not allowed to talk to us!
[1535126185] Connection from 1.2.3.4 closed.
[1535126219] CONN_CHECK_PEER: checking if host is allowed: 1.2.3.4 port 22153
[1535126219] Connection from 1.2.3.4 port 22153
[1535126219] is_an_allowed_host (AF_INET): is host >1.2.3.4< an allowed host >1.2.3.4<
[1535126219] Host 1.2.3.4 is not allowed to talk to us!
[1535126219] Connection from 1.2.3.4 closed.
[1535126228] Caught SIGTERM - shutting down...
[1535126228] Daemon shutdown
^C
# /usr/local/nagios/libexec/check_nrpe -H host.domain.local && tail -f /usr/local/nagios/var/nrpe.log
CHECK_NRPE: Error - Could not connect to 1.2.3.4: Connection reset by peer
#