问题
在配置SSL
认证后,需要放开防火墙的443
端口,出现了FirewallD is not running
错误
java
[root@xxx ~]# firewall-cmd --zone=public --add-port=443/tcp --permanent
FirewallD is not running
解决
只需要开启防火墙即可。
【1】先通过systemctl status firewalld
命令查看一下防火墙的状态,发现当前是dead
状态,即防火墙未开启。
java
[root@xxx ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
【2】通过systemctl start firewalld
命令开启防火墙
java
[root@xxx ~]# systemctl start firewalld
【3】 防火墙开启后,再次查看防火墙状态为running
即可。
java
[root@xxxx ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: active (running) since Mon 2024-02-19 22:40:51 CST; 40s ago
Docs: man:firewalld(1)
Main PID: 664 (firewalld)
CGroup: /system.slice/firewalld.service
└─664 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
【4】再次执行自己命令就会返回success
。
java
[root@xxx ~]# firewall-cmd --zone=public --add-port=443/tcp --permanent
success
扩展
可以通过systemctl stop firewalld
命令关闭防火墙设置
java
[root@xxx ~]# systemctl stop firewalld