NRPE configuration question
Posted: Tue Apr 16, 2019 4:15 pm
Hello,
One of my Linux admins noticed some errors in our NRPE log file:
@nagiosxi:/var/log>sudo cat messages| grep -E "not allowed to talk"
Apr 16 13:05:25 nagiosxi nrpe[49782]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:06:11 nagiosxi nrpe[50771]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:06:23 nagiosxi nrpe[50954]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:06:50 nagiosxi nrpe[51566]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:08:37 nagiosxi nrpe[55638]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:08:58 nagiosxi nrpe[56072]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:10:23 nagiosxi nrpe[59130]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:11:10 nagiosxi nrpe[60194]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:11:21 nagiosxi nrpe[60382]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:11:48 nagiosxi nrpe[61034]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:13:36 nagiosxi nrpe[63350]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:13:57 nagiosxi nrpe[63781]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:15:22 nagiosxi nrpe[409]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:16:08 nagiosxi nrpe[1512]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:16:18 nagiosxi nrpe[1685]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:16:47 nagiosxi nrpe[2314]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:18:35 nagiosxi nrpe[4803]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:18:55 nagiosxi nrpe[5235]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:20:21 nagiosxi nrpe[7131]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:21:07 nagiosxi nrpe[8233]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:21:17 nagiosxi nrpe[8404]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:21:44 nagiosxi nrpe[8932]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:23:33 nagiosxi nrpe[11530]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:23:54 nagiosxi nrpe[11984]: Host 10.131.86.58 is not allowed to talk to us!
Now, the IP addresses listed in the errors are my other XI servers. One is a fail over mirror and the other is a test environment. As far as I know NRPE is working in the checks we are using it in, but should I allow NRPE communication between my various XI servers?
This is what the NRPE.conf file looks like now:
# ALLOWED HOST ADDRESSES
# This is an optional comma-delimited list of IP address or hostnames
# that are allowed to talk to the NRPE daemon. Network addresses with a bit mask
# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently
# supported.
#
# Note: The daemon only does rudimentary checking of the client's IP
# address. I would highly recommend adding entries in your /etc/hosts.allow
# file to allow only the specified host to connect to the port
# you are running this daemon on.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
allowed_hosts=127.0.0.1,::1
My Linux admin recommended we change the allow_hosts line to this:
allowed_hosts=127.0.0.1,10.131.86.58,10.231.86.58,10.131.86.60
Would that be best practice?
One of my Linux admins noticed some errors in our NRPE log file:
@nagiosxi:/var/log>sudo cat messages| grep -E "not allowed to talk"
Apr 16 13:05:25 nagiosxi nrpe[49782]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:06:11 nagiosxi nrpe[50771]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:06:23 nagiosxi nrpe[50954]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:06:50 nagiosxi nrpe[51566]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:08:37 nagiosxi nrpe[55638]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:08:58 nagiosxi nrpe[56072]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:10:23 nagiosxi nrpe[59130]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:11:10 nagiosxi nrpe[60194]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:11:21 nagiosxi nrpe[60382]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:11:48 nagiosxi nrpe[61034]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:13:36 nagiosxi nrpe[63350]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:13:57 nagiosxi nrpe[63781]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:15:22 nagiosxi nrpe[409]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:16:08 nagiosxi nrpe[1512]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:16:18 nagiosxi nrpe[1685]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:16:47 nagiosxi nrpe[2314]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:18:35 nagiosxi nrpe[4803]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:18:55 nagiosxi nrpe[5235]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:20:21 nagiosxi nrpe[7131]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:21:07 nagiosxi nrpe[8233]: Host 10.131.86.58 is not allowed to talk to us!
Apr 16 13:21:17 nagiosxi nrpe[8404]: Host 10.131.86.60 is not allowed to talk to us!
Apr 16 13:21:44 nagiosxi nrpe[8932]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:23:33 nagiosxi nrpe[11530]: Host 10.231.86.58 is not allowed to talk to us!
Apr 16 13:23:54 nagiosxi nrpe[11984]: Host 10.131.86.58 is not allowed to talk to us!
Now, the IP addresses listed in the errors are my other XI servers. One is a fail over mirror and the other is a test environment. As far as I know NRPE is working in the checks we are using it in, but should I allow NRPE communication between my various XI servers?
This is what the NRPE.conf file looks like now:
# ALLOWED HOST ADDRESSES
# This is an optional comma-delimited list of IP address or hostnames
# that are allowed to talk to the NRPE daemon. Network addresses with a bit mask
# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently
# supported.
#
# Note: The daemon only does rudimentary checking of the client's IP
# address. I would highly recommend adding entries in your /etc/hosts.allow
# file to allow only the specified host to connect to the port
# you are running this daemon on.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
allowed_hosts=127.0.0.1,::1
My Linux admin recommended we change the allow_hosts line to this:
allowed_hosts=127.0.0.1,10.131.86.58,10.231.86.58,10.131.86.60
Would that be best practice?