Adding allowed list to nrpe.cfg

Add the IP address of the nagios server to nrpe.cfg, for my case my configuration file is located in /usr/local/nagios/etc/nrpe.cfg, if your cfg file is located else where use this command to find find / -name nrpe.cfg

Search for the parameter allowed_hosts:

# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currentl$
# 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 192.168.0.140

append the nagios server ip address.

Advertisements
This entry was posted in Network Maintenance and tagged , . Bookmark the permalink.

One Response to Adding allowed list to nrpe.cfg

  1. Greg Knox says:

    allowed_hosts is a comma-separated list, so that line should read

    allowed_hosts=127.0.0.1,192.168.0.140

    and not

    allowed_hosts=127.0.0.1 192.168.0.140

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s