百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>服务器> 详解CentOS7防火墙设定
分享文章到:

详解CentOS7防火墙设定

发布时间:12/01 来源:未知 浏览: 关键词:
下面由centos根基教程栏目给大家介绍CentOS7防火墙设定,但愿对需要的伴侣有所帮忙!

1.查看系统版本

在设定防火墙的时候,第一查看linux系统版本。

lsb_release -a

centOS7 系统没有此命令

cat /etc/redhat-release(/etc/centos-release)
输出:CentOS Linux release 7.4.1708 (Core)

此命令关于CentOS6和CentOS7都可以使用。linux系统中etc文件夹主要用于存置一些配置文件。

2.防火墙相关命令

启动: systemctl start firewalld
查看状态: systemctl status firewalld 
制止开机启动: systemctl disable firewalld  
关闭效劳: systemctl stop firewalld 关闭

3.systemctl命令

systemctl是CentOS7的效劳治理工具中主要的工具,它融合此前service和chkconfig的功效于一体。使用办法如下:

启动一个效劳:systemctl start firewalld.service
关闭一个效劳:systemctl stop firewalld.service
重新启动一个效劳:systemctl restart firewalld.service
显示一个效劳的状态:systemctl status firewalld.service
在开机时启用一个效劳:systemctl enable firewalld.service
在开机时禁用一个效劳:systemctl disable firewalld.service
查看效劳可否开机启动:systemctl is-enabled firewalld.service
查看已启动的效劳列表:systemctl list-unit-files|grep enabled
查看启动失败的效劳列表:systemctl --failed

留意:CentOS7 以下版本是用iptables为防火墙效劳的。

以上就是详解CentOS7防火墙设定的具体内容,更多请关注百分百源码网其它相关文章!

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有150人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板