Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I need to open port 7001 in a linux server ( RHEL 6.3 ). Firewall is not running.

[root@hslsaoid2 ~]# service iptables status
iptables: Firewall is not running.

Please find the netstat -ntpl output

[root@hslsaoid2 ~]# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:57991               0.0.0.0:*                   LISTEN      15590/rpc.mountd
tcp        0      0 0.0.0.0:875                 0.0.0.0:*                   LISTEN      15586/rpc.rquotad
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1299/rpcbind
tcp        0      0 0.0.0.0:55698               0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:51828               0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1582/sshd
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1474/cupsd
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1674/master
tcp        0      0 0.0.0.0:47486               0.0.0.0:*                   LISTEN      1425/rpc.statd
tcp        0      0 0.0.0.0:2049                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:34658               0.0.0.0:*                   LISTEN      15590/rpc.mountd
tcp        0      0 0.0.0.0:42820               0.0.0.0:*                   LISTEN      15590/rpc.mountd
tcp        0      0 :::5989                     :::*                        LISTEN      1767/cimservermain
tcp        0      0 :::34122                    :::*                        LISTEN      15590/rpc.mountd
tcp        0      0 :::111                      :::*                        LISTEN      1299/rpcbind
tcp        0      0 :::22                       :::*                        LISTEN      1582/sshd
tcp        0      0 :::46679                    :::*                        LISTEN      15590/rpc.mountd
tcp        0      0 ::1:631                     :::*                        LISTEN      1474/cupsd
tcp        0      0 ::1:25                      :::*                        LISTEN      1674/master
tcp        0      0 :::46521                    :::*                        LISTEN      1425/rpc.statd
tcp        0      0 :::36283                    :::*                        LISTEN      -
tcp        0      0 :::32896                    :::*                        LISTEN      -
tcp        0      0 :::8704                     :::*                        LISTEN      13631/java
tcp        0      0 :::2049                     :::*                        LISTEN      -
tcp        0      0 :::60929                    :::*                        LISTEN      15590/rpc.mountd

I tried to edit in /etc/sysconfig/iptables and restart the firewall but failed.. Kindly help to open port..

share|improve this question
1  
You need to start an program or daemon which listens this port. There are no any "opening port" in general. –  dchirikov Oct 17 '13 at 8:09
    
The port is open since there's no firewall. What exactly are you trying to do? –  Gilles Oct 17 '13 at 21:38

1 Answer 1

First something has to bind to your port, it means something has to use such port, like httpd (usually) uses 80 or 443. If nothing is using such port then you cannot connect to it, that is logical. You can test it with:

nc -l 7001

And then from remote try to connect to it:

nc $yourhost 7001
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.