CentOS8 更改防火墙状态

    技术2026-06-16  5

    查询防火墙状态

    systemctl status firewalld.service 如果 Active 下为绿色的 active(running) ,表明防火墙是开启的状态。

    关闭防火墙

    systemctl stop firewalld.service 如果 Active 下为 inactive(dead) ,表明防火墙是关闭的状态。

    开启防火墙

    systemctl start firewalld.service 可以看到,防火墙打开。

    Processed: 0.008, SQL: 10