LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Cant open port (https://www.linuxquestions.org/questions/linux-security-4/cant-open-port-691631/)

masatheesh 12-19-2008 01:36 AM

Cant open port
 
Hi,

I am using Oracle Enterprise Linux 5.0.Here if I open the port number 2372 by using iptables, it will not open.I am checking this port status by using the command " telnet 192.168.0.1 2372". I get the message as following

telnet: connect to address 192.168.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused

Is this procedure correct to get the port status? Can anybody please guide me to open this port?

repo 12-19-2008 04:46 AM

which rule did you used to open the port?
which service are you running behind the port?

telnet is ok to check the port

Mr. ameya sathe 12-19-2008 04:50 AM

Run this command & put here the output of the command

netstat -tanp | grep 2372

win32sux 12-19-2008 09:56 PM

Just to clarify a bit as to the feedback you've received: For a port to be open, something needs to be listening on it. Making a rule allowing packets into a certain port won't open the port - it will still be closed until something actually listens on it. The netstat command you've been given would show us if anything is actually listening on port 2372, which I suspect isn't the case.

masatheesh 12-20-2008 05:58 AM

Thanks for your replies

I have added following line in iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2372 -j ACCEPT


I am not running any service behind this port

No response for following command
netstat -tanp | grep 2372

repo 12-20-2008 06:32 AM

Quote:

I am not running any service behind this port
As told in previous posts, you need to run a service behind the port.
ex. behind port 22 runs ssh deamon.


All times are GMT -5. The time now is 09:41 AM.