1
1

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.

CentOS で iptables start して「ファイアウォールルールを適用中」で止まる対処法

Last updated at Posted at 2014-12-28

service iptables start し、「ファイアウォールルールを適用中(英語環境では Applying firewall rules)」で止まって動かなくなってしまいました。調べても同様の現象が出てこなかったので書いておきます。

止まるときに /var/log/message に下記のような出力がされていました。

/var/log/message
Dec 28 16:21:52 (サーバー名) kernel: OUTPUT DROPPED: IN= OUT=eth0 SRC=(サーバーIPアドレス) DST=(自宅で契約しているプロバイダのIPアドレス) LEN=212 TOS=0x10 PREC=0x00 TTL=64 ID=28597 DF PROTO=TCP SPT=(SSHDのポート番号) DPT=43382 WINDOW=266 RES=0x00 ACK PSH URGP=0

よくわかってないんですが、処理が完了したことを知らせるパケットが飛ぶんですかね? それを iptables で DROP してしまっているのが原因ぽいです。

SSHD のポート番号から出て行くパケットを許可すれば良さそうですが、今回はサーバから OUTPUT するパケットを ACCEPT することで解決しました。

# iptables -P OUTPUT  ACCEPT
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?