🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
>[danger] 查看防火墙是否开启 ``` firewall-cmd --state ``` + 开启状态(默认) ``` [root@liang ~]# firewall-cmd --state running [root@liang ~]# ``` + 关闭状态 ``` [root@liang ~]# firewall-cmd --state not running [root@liang ~]# ``` >[danger] 关闭防火墙 ``` [root@liang ~]# systemctl stop firewalld [root@liang ~]# ``` >[danger] 防火墙开机自启 + 允许防火墙开机自启(默认) ``` [root@liang ~]# systemctl enable firewalld Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service. Created symlink from /etc/systemd/system/multi-user.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service. [root@liang ~]# ``` + 禁止防火墙开机自启 ``` [root@liang ~]# systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [root@liang ~]# ```