虚拟机FirewallD is not running
时间: 2023-12-09 11:37:02 浏览: 134
以下是检查虚拟机FirewallD是否运行的方法:
```shell
systemctl status firewalld
```
如果FirewallD正在运行,将会输出类似以下内容:
```
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-08-10 14:20:20 CST; 1h 5min ago
Docs: man:firewalld(1)
Main PID: 1234 (firewalld)
Tasks: 2
Memory: 27.3M
CGroup: /system.slice/firewalld.service
└─1234 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Aug 10 14:20:19 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Aug 10 14:20:20 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
```
如果FirewallD没有运行,将会输出类似以下内容:
```
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
```
如果FirewallD没有运行,可以使用以下命令启动它:
```shell
systemctl start firewalld
```
如果想要在开机时自动启动FirewallD,可以使用以下命令:
```shell
systemctl enable firewalld
```
阅读全文