码迷,mamicode.com
首页 > 其他好文 > 详细

centos 关于防火墙的命令

时间:2016-09-01 23:10:20      阅读:399      评论:0      收藏:0      [点我收藏+]

标签:

CentOS7默认的防火墙不是iptables,而是firewalle.

安装iptable iptable-service

技术分享
#先检查是否安装了iptables
service iptables status
#安装iptables
yum install -y iptables
#升级iptables
yum update iptables 
#安装iptables-services
yum install iptables-services




注:防火墙的基本操作命令:

查询防火墙状态:

[root@localhost ~]# service   iptables status<回车>

 

停止防火墙:

[root@localhost ~]# service   iptables stop <回车>

 

启动防火墙:

[root@localhost ~]# service   iptables start <回车>

 

重启防火墙:

[root@localhost ~]# service   iptables restart <回车>

 

永久关闭防火墙:

[root@localhost ~]# chkconfig   iptables off<回车>

 

永久关闭后启用:

[root@localhost ~]# chkconfig   iptables on<回车>

centos 关于防火墙的命令

标签:

原文地址:http://www.cnblogs.com/chong518/p/5831592.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!