ファイヤーウォールの設定

アクセス全許可するIPアドレスの登録。

# firewall-cmd --zone=trusted --add-source=192.168.3.0/24 --permanent

不要なサービスの削除。

# firewall-cmd --zone=public --remove-service=dhcpv6-client --permanent
# firewall-cmd --zone=public --remove-service=ssh --permanent

定義済みのサービス一覧。

# firewall-cmd --get-services

サービス(http,https)の追加。

# firewall-cmd --zone=public --add-service=http --permanent
# firewall-cmd --zone=public --add-service=https --permanent

設定の反映。

# firewall-cmd --reload

設定の確認。

# firewall-cmd --list-all-zones

firewall の自動起動。

# systemctl enable firewalld

firewall の停止。

# systemctl stop firewalld

firewall の自動起動停止。

# systemctl disable firewalld

centos/v7/ファイヤーウォールの設定.txt · 最終更新: 2018/07/18 15:40 by admin
 
特に明示されていない限り、本Wikiの内容は次のライセンスに従います: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki