3
2

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.

firewalldコマンド ダッシュボード

Last updated at Posted at 2017-11-04

firewall稼働状態

$ firewall-cmd --state

アクティブゾーンを調べる

firewall-cmd --get-active-zones

現在の設定の確認: アクティブゾーン

firewall-cmd --list-all

現在の設定の確認: 全てのゾーン

firewall-cmd --list-all-zones

サービス追加、削除

  • 追加

firewall-cmd --permanent --add-service=ssh

  • 削除

firewall-cmd --permanent --zone=public --remove-service=ssh

ポート追加、削除

  • 追加

firewall-cmd --zone=public --add-port=3000/tcp --permanent

  • 削除

firewall-cmd --zone=public --remove-port=3000/tcp --permanent

リッチ言語コマンド

firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="22" accept"

リロード

sudo firewall-cmd --reload

3
2
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
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?