Operating System - Linux
1829332 Members
2087 Online
109989 Solutions
New Discussion

Unable to Connect to Specific Port

 
Andrew Kaplan
Super Advisor

Unable to Connect to Specific Port

Hi there --

We have a server running Fedora Core 3 and I have modified the /etc/services file to open port 5666 to allow TCP connections. The syntax of the newly added line is as follows:

nrpe 5666/tcp # NRPE

After the line was added I stopped and restarted xineted via the startup script /etc/init.d/xinetd. After that, I tested the port's accessibility via telnet from a Windows 2000 workstation. The command syntax used there was:

telnet 5666

The result was an error message saying connection could not be established. I verified the system could be pinged and also was found via nslookup.

What else do I need to check for in order to correct this problem? Thanks.
A Journey In The Quest Of Knowledge
3 REPLIES 3
Stuart Fuller_2
Valued Contributor

Re: Unable to Connect to Specific Port

/etc/services is simply a translation map between service names (nrpe) and port numbers (5666). Putting a line in that file does not open a port.

What opens a port is either running a program that listens on that port, or adding an entry in /etc/xinetd.conf (or an appropriate file in /etc/xinetd.d), then restarting xinetd.

From a quick read of the documentation, it looks like you just run it:

/usr/local/nagios/bin/nagios -d

Stuart Browne
Honored Contributor

Re: Unable to Connect to Specific Port

The other thing you need to do is ensure it's allowed through the system's firewall.

Use 'iptables -nvL' to see what's currently allowed/not allowed.
One long-haired git at your service...
Bejoy C Alias
Respected Contributor

Re: Unable to Connect to Specific Port

Check whether port no 5666 is listening for telnet connections by using
netstat -nlp |grep 5666,
there should be xinetd listening on this port.
Be Always Joy ......