Ubuntu系统
防火墙基础操作
systemctl status ufw
- status 查看
- stop 停止
- start 启动
- restart 重启
- disable 开机自启 - 关闭
- enable 开机自启 - 启动
查看防火墙关闭状态
ufw status
返回“Status: inactive”则关闭
CentOS系统
防火墙基础操作
systemctl status firewalld
- status 查看
- stop 停止
- start 启动
- restart 重启
- disable 开机自启 - 关闭
- enable 开机自启 - 启动