Linuxサーバーポートが開いている

Linuxサーバーポートが開いている

Linuxサーバー(RHEL 6.3)でポート7001を開く必要があります。ファイアウォールが実行されていません。

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

netstat -ntpl出力を探してください

[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

/etc/sysconfig/iptablesファイアウォールを編集して再起動しようとしましたが、失敗しました。

ベストアンサー1

まず、何かをポートにバインドする必要があります。これは、何かがそのようなポートを使用する必要があることを意味します。たとえば、httpdは(通常)80または443を使用します。そのようなポートを使用することがないと、そのポートに接続できず、これは論理的です。以下を使用してこれをテストできます。

nc -l 7001

その後、リモートから接続を試みます。

nc $yourhost 7001

おすすめ記事