http を追加するときにファイアウォールエラーが発生する

http を追加するときにファイアウォールエラーが発生する

CentOS 7 (新しい digitalocean イメージ) 上の firewalld のパブリック ゾーンに http を追加しようとしています。

これが、firewalld 経由で Web サイトにアクセスできるようにする正しい/安全な方法でない場合は、誰か訂正してください。

私が抱えている問題は次のとおりです:

[root@wilberforce ~]# firewall-cmd --add-service=http
Error: COMMAND_FAILED: '/sbin/iptables -A IN_public_allow -t filter -m tcp -p tcp --dport 80 -m conntrack --ctstate NEW -j ACCEPT' failed: iptables: No chain/target/match by that name.
Failed to apply rules. A firewall reload might solve the issue if the firewall has been modified using ip*tables or ebtables.

の下に http と https の両方がリストされていますfirewall-cmd --get-services。サービスを追加できないのはなぜですか?

答え1

不正なfirewalldプロセスが実行されており、新しいルールの追加を許可しませんでした。これはsystemdでは管理できませんでした。次の方法で解決しました。

systemctl stop firewalld
pkill -f firewalld
systemctl start firewalld

関連情報