LoginSignup
2
1

More than 5 years have passed since last update.

CentOS7のFirewall設定でよく使うコマンドのまとめ

Posted at

確認

  • 現在設定を確認する
firewall-cmd --list-all
  • zoneを確認する
firewall-cmd --get-active-zones
firewall-cmd --get-default-zone

操作

  • 設定追加
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-port 8080/tcp
  • 設定除外
firewall-cmd --permanent --zone=public --remove-service=http
firewall-cmd --permanent --zone=public --remove-port 8080/tcp
2
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
2
1