美文网首页Linux学习|Gentoo/Arch/FreeBSD
CentOS Firewalld防火墙使用简介

CentOS Firewalld防火墙使用简介

作者: 免跪姓黄 | 来源:发表于2019-12-16 10:36 被阅读0次
  1. 启动:systemctl start firewalld.service

  2. 关闭:systemctl stop firewalld.service

  3. 开机启用:systemctl enable firewalld.service

  4. 开启禁用:systemctl disable firewalld.service

  5. 查询状态:systemctl status firewalld.service

  6. 查看版本:firewall-cmd --version

  7. 查看所有打开的端口:firewall-cmd --zone=public --list-ports

  8. 添加指定的端口(80端口):firewall-cmd --zone=public --add-port=80/tcp --permanent
    (--permanent 表示永久生效,没有此参数重启后失效)

  9. 删除指定的端口(80端口):firewall-cmd --zone= public --remove-port=80/tcp --permanent

  10. 重新加载:firewall-cmd --reload

相关文章

网友评论

    本文标题:CentOS Firewalld防火墙使用简介

    本文链接:https://www.haomeiwen.com/subject/ukprnctx.html