Page 1 of 1

unable to connect to NRPE remotly.

Posted: Fri Sep 29, 2017 12:06 pm
by mikeparker
I'm having trouble getting NRPE running.

I've followed two metedos intsalling the plugins via apt-get

# apt-get install openssl nagios-nrpe-server nagios-plugins nagios-plugins-basic nagios-plugins-standard
--then set the allowed hosts
restarted nrpe services

I';ve also tried the methods layed out to Compile and Installation
from : https://support.nagios.com/kb/article.php?id=8 configuring xinetd.

but i seem to get suck at the same point with both methods using ic an successfully check_nrpe locally but not remotly, it times out.

i've tried increasing the timeouts,
i can see on my firewall the traffic is being router to the target on the right port.
i can use tcp on the target to see the packets from the nagios server.

i do not see a response in tcp dump or on my firewall for any return packets.
all services have been restarted after changes made.

i've included various config files, looking for help

Re: unable to connect to NRPE remotly.

Posted: Fri Sep 29, 2017 12:36 pm
by mikeparker
additional files.

Re: unable to connect to NRPE remotly.

Posted: Fri Sep 29, 2017 12:44 pm
by dwasswa
Hi @mikeparker,

Can you please check your firewall on remote host just to make sure port 5666 is open with command

Code: Select all

firewall-cmd --list-all 
Also make usre you installed NRPE agent on the remote(target host) and not on XI.

Please post your

Code: Select all

/etc/xinetd.d/nrpe
config file.

Re: unable to connect to NRPE remotly.

Posted: Fri Sep 29, 2017 1:08 pm
by mikeparker
/etc/xinetd.d/nrpe was posted in the comment above.

NRPE agent on the remote(target host)

for the firewall command: -- firewalld package is not insalled.
as mentioned i can see the packets hitting eth0 with a tcp dump.

i installed firewalld and ran that command:

root@testcore1:/etc/xinetd.d# firewall-cmd --list-all
public (default)
interfaces:
sources:
services: dhcpv6-client ssh
ports:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:

but have since stopped and removed that package as it impacted our ability to connect to other services on that machine (apache)

Re: unable to connect to NRPE remotly.

Posted: Fri Sep 29, 2017 1:16 pm
by mikeparker
you got me on the right path.

i turned off the ubuntu ufw and it worked.
i've enabled it and opened the ports and we are still testing good.

commands for reference.

sudo ufw disable
sudo ufw enable
sudo ufw allow <port>

thanks for the quick response! this is resolved for me.

Re: unable to connect to NRPE remotly.

Posted: Fri Sep 29, 2017 1:28 pm
by dwasswa
I was not aware that you were using ubuntu, i thought you were on centos.

But true,the was a firewall issue. Opening that port was surely the solution.

Am really glad it worked for you. Therefore,am going to close this thread as resolved.

If you have any other questions please open a new thread and we'll be glad to help.