CentOS7のファイアウォールの停止方法を紹介!

CentOS7のファイアウォールの停止方法を紹介します。CentOS7では初期のファイアウォールはiptablesではなくfirewalldに変更されています。firewalldを使ったファイアウォールの停止方法を解説していきます。

コンテンツ [表示]

  1. 1CentOS7からiptablesではなくfirewalld
  2. 2CentOS7でファイアウォールの設定を確認する方法
  3. 3CentOS7のファイアウォールの停止方法
  4. 3.1ファイアウォールの停止
  5. 3.2ファイアウォールの自動起動の停止方法

CentOS7からiptablesではなくfirewalld

CentOS7からファイアウォールの初期設定はiptablesではなくfirewalldに変更されています。

これまでiptablesで設定していた方は少し戸惑うかもしれませんが、新しいfirewalldコマンドの使い方を覚えましょう。

CentOS7でファイアウォールの設定を確認する方法

まずファイアウォールの設定の確認方法です。下記のコマンドを実行しましょう。

ファイアウォールの設定を確認するコマンド

systemctl status firewalld

またファイアウォールの自動起動を確認したい場合は下記のコマンドを実行しましょう。

ファイアウォールの自動起動を確認するコマンド

systemctl is-enabled iptables

CentOS7のファイアウォールの停止方法

次にファイアウォールの停止方法について順番に紹介していきます。

ファイアウォールの停止

ファイアウォールを停止するには下記のコマンドを実行します。

ファイアウォールの停止方法

# 停止
systemctl stop firewalld
 
 # 確認
 systemctl status firewalld

ファイアウォールの自動起動の停止方法

ファイアウォールの自動起動の停止方法

# 停止
systemctl disable firewalld

# 確認
systemctl is-enabled iptables

# 再度自動起動したい場合
systemctl enable firewalld
GeekHive採用サイト

関連記事