Unix/Linux Go Back    

IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum.

[solved] Allowing Connections to a Specific Port

IP Networking

Closed Linux or Unix Question    
Thread Tools Search this Thread Display Modes
Old Unix and Linux 10-10-2012
mrm5102 mrm5102 is offline
Registered User
Join Date: Jul 2012
Last Activity: 2 April 2015, 1:38 PM EDT
Posts: 182
Thanks: 93
Thanked 10 Times in 9 Posts
[solved] Allowing Connections to a Specific Port

Hello All,

I've come here as a last resort. I've been messing around with this for the last few days now and can't figure out
what is going on, and why it isn't working...

I have NRPE Running on a OpenSuSE 11.4 Virtual Machine on my Laptop for testing. The VM uses a "Bridged" Connection in
order to give it it's own IP Address on the network. I definitely have the nrpe.cfg Config File configured correctly
because I've setup NRPE on a TON of other servers on the network with no problems.

FYI: I'm running NRPE in Daemon mode...

I can see in the syslog that it says, it is LISTENING on port 5666 and that it is allowing from the correct server IP.
But when I try to run "check_nrpe" command from my Nagios Server I get "Connection Refused by Host".

Here's what's in "/var/log/messages":
*I've added some test commands to the config as well. I.e. to be run with "check_nrpe -H <ip_address> -t 10 -c "test_check_command"
Oct 10 12:42:10 Matt-suse-vm nrpe[22346]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Oct 10 12:42:10 Matt-suse-vm nrpe[22347]: Starting up daemon
Oct 10 12:42:10 Matt-suse-vm nrpe[22347]: Listening for connections on port 5666
Oct 10 12:42:10 Matt-suse-vm nrpe[22347]: Allowing connections from:,
Oct 10 12:50:01 Matt-suse-vm nrpe[22704]: Added command[check_firefox]=/usr/local/nagios/libexec/check_process -p "/usr/lib/firefox/firefox-bin" -w 10 -c 20 -t cpu
Oct 10 12:50:01 Matt-suse-vm nrpe[22704]: Added command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
Oct 10 12:50:01 Matt-suse-vm nrpe[22704]: Added command[check_Xorg]=/usr/local/nagios/libexec/check_process -w 5 -c 10 -t cpu
Oct 10 12:50:01 Matt-suse-vm nrpe[22704]: Added command[check_checkNRPE]=/usr/local/nagios/libexec/check_nrpeDaemon --check
Oct 10 12:50:01 Matt-suse-vm nrpe[22704]: Added command[check_killNRPE]=/usr/local/nagios/libexec/check_nrpeDaemon --kill-nrpe $ARG1$
Oct 10 12:50:01 Matt-suse-vm nrpe[22704]: Added command[check_users]=/usr/local/nagios/libexec/check_users -w 2 -c 5

Where it says "Allowing connections from...", the first one listed is the Nagios Server and the 2nd one
is MY local machine (i.e. not the "guest" VM's IP, but my "host" IP) so I could try testing from my machine as well...

I am able to SSH to the Virtual Machine from ANY computer on the local network so I know the machines
can talk to one another... I've tried adding "nrpe tcp/5666" to "/etc/services" but I don't think that means anything
since it's running as a Daemon and not with xinetd...

Here's the Output from 'netstat':

# netstat -tulpen | grep -i nrpe
tcp    0   0*     LISTEN    1002  87259      22347/nrpe          

# netstat -at | grep nrpe
tcp        0      0 localhost:nrpe          *:*         LISTEN

I'm not positive but I don't think those netstat outputs are shwoing that it is setup correctly? I.e. in terms of what
'address' they are showing... i.e. I don't think it should be showing ""???

Also, I've turned the Firewall Completely off and tried again and still nothing...

Lastly, here's the Output from 'check_nrpe': (* is the address of the VM)

NagiosSrv:/usr/local/nagios/libexec # ./check_nrpe -H
Connection refused by host

Sorry for the LONG post, but I wanted to give as much detail as possible...
If anyone has ANY suggestions please feel free... I am at a loss here! Unix or Linux Image --> EXACTLY HOW I FEEL haha

Thanks in Advance,

---------- Post updated at 03:08 PM ---------- Previous update was at 01:46 PM ----------


Ughhh...... Found the Problem!!!!

Boy do I feel dumb...
Basically in the nrpe.cfg file for the "server_address=..." directive apparently you can't use the "loopback" interface ip
which I thought was just another way of writing the Localhost's IP Address but I guess it's NOT??

I wanted to use that (i.e., because everytime I boot up my Virtual Machine (almost everytime), I get a new
IP Address. Which is a real pain in the you know what because I would have to edit the Config file just about everytime
start NRPE...

Maybe I'll write a little script to check "ifconfig" and change the IP Address in the nrpe.cfg file if it's different from the
one currently in the Config...

Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to open 6000 port for XDMCP? purushottamaher HP-UX 15 06-07-2012 05:53 AM
Server has more TIME_WAIT connections in Apache(port 80) chandranjoy UNIX for Dummies Questions & Answers 4 01-08-2011 01:24 AM
Releasing a Port kkeng808 AIX 2 05-31-2010 05:21 AM
How to check if a Port is accepting connections. vikings.svnit Shell Programming and Scripting 5 08-08-2009 11:14 AM
How can I find the number of connections from a specific IP address historically? tkimber Solaris 3 03-18-2008 10:38 AM

All times are GMT -4. The time now is 09:06 PM.