我正在嘗試將http新增至CentOS 7(新的digitalocean映像)上的firewalld中的公共區域。
如果這不是透過防火牆造訪我的網站的正確/安全方法,請有人糾正我。
我遇到的問題是:
[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
正在運行一個流氓防火牆進程,該進程不允許添加新規則。它無法由 systemd 管理。下面的方法就成功了:
systemctl stop firewalld
pkill -f firewalld
systemctl start firewalld