2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

linux > 空きポートの確認 (ホストmacとゲストCentOS)

Last updated at Posted at 2015-06-20
動作環境
仮想ゲストOS: CentOS6.5
ホストOS: Mac OSX

CentOS6.5のポート開放をしているのだが、きちんと開くようになったか調べる必要があった。以下のようにした。

CentOS6.5側

nc(netcat)をインストールしておく

  1. iptablesを書き換える
  2. /etc/init.d/iptables restart
  3. nc -l 31415にてポート31415で待つ

Mac OSX側

ターミナルで以下を実行する

telnet 192.168.10.5 31415

3つめの数字がポート。

Connection refused

CentOS側でncを実行していないとどうなるか。

telnet: connect to address 192.168.10.5: Connection refused

と表示され、あたかもポート開放ができていないように勘違いする。

参考


(追記 2015/10/18) Windowsからチェックする場合は PortQry2 というツールを使う。 http://qiita.com/7of9/items/1d2e123d592d22fd6c55
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?