前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >CentOs 防火墙开启关闭方法

CentOs 防火墙开启关闭方法

作者头像
Li_XiaoJin
发布2022-06-10 20:53:55
7770
发布2022-06-10 20:53:55
举报
文章被收录于专栏:Lixj's BlogLixj's Blog

关于开启关闭防火墙、开机启动等。我的系统是CentOs7,重装换了CentOs8

  1. 查看防火墙状态 systemctl |grep firewalld.service
  2. 关闭防火墙 systemctl stop firewalld.service
  3. 开启防火墙 systemctl start firewalld.service systemctl restart firewalld.service
  4. 自启动
代码语言:javascript
复制
# 关闭自启动
systemctl disable firewalld.service

# 打开自启动
systemctl enable firewalld.service

# 查询自启动服务
systemctl list-unit-files|grep firewalld.service

扩展知识:systemctl is-enabled iptables.service#查询服务是否开机启动systemctl is-enabled servicename.service #开机运行服务systemctl enable *.service #取消开机运行systemctl disable *.service #启动服务systemctl start *.service #停止服务systemctl stop *.service #重启服务systemctl restart *.service #重新加载服务配置文件systemctl reload *.service #查询服务运行状态systemctl status *.service #显示启动失败的服务systemctl --failed

Copyright: 采用 知识共享署名4.0 国际许可协议进行许可 Links: https://lixj.fun/archives/centos防火墙开启关闭方法

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021-01-15,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档