トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS

Top / linux / System Command Examples / firewall-cmd command
Last-modified: 2017-11-06 (月) 09:29:10 (2040d)

firewall-cmd firewall-cmdコマンドのよく使うオプション


許可されている一覧を表示したいとき

  • syntax:
    firewall-cmd --list-all


指定したZoneに許可されているサービス、ポートの一覧を表示したいとき

  • syntax:
    firewall-cmd --list-services --zone=public
    firewall-cmd --list-ports --zone=public


許可するサービス、ポートの追加、削除を行う

  • syntax:
    firewall-cmd --add-service=ssh --zone=public --permanent
    firewall-cmd --add-port=22/tcp --zone=public --permanent

    firewall-cmd --remove-service=ssh --zone=public --permanent
    firewall-cmd --remove-port=22/tcp --zone=public --permanent


  • comment:
    permanentをつけるとReboot後も設定が残るが、後述のReloadを行うまでは反映されない
    permanentをつけない場合には、コマンド投入と同時に反映されるが、Rebootとともに忘れます


利用可能なサービス一覧を取得する

  • syntax:
    firewall-cmd --get-services


firewalldのリロード処理を行う


Top / linux / System Command Examples / firewall-cmd command