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

centos防火墙基本操作

时间:2017-02-25 18:56:49      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:alt   自启动   sysconfig   ges   启动   tables   png   off   log   

CentOS防火墙的基本操作

查看防火墙状态:

[root@centos ~]# service iptables status

 技术分享

开放8080访问端口:

[root@centos ~]# vi /etc/sysconfig/iptables

 技术分享

重启防火墙后查看

 技术分享

停止防火墙:

[root@centos ~]# service iptables stop

 技术分享

启动防火墙:

[root@centos ~]# service iptables start

 

重启防火墙:

[root@centos ~]# service iptables restart

 

查看防火墙的开机自启动状态

[root@centos ~]# chkconfig –list

 技术分享

永久关闭防火墙(也可以直接删除开机启动#chkconfig --del iptables):

[root@centos ~]# chkconfig iptables off

技术分享 

永久关闭后启用:

[root@centos ~]# chkconfig iptables on

centos防火墙基本操作

标签:alt   自启动   sysconfig   ges   启动   tables   png   off   log   

原文地址:http://www.cnblogs.com/lzhl/p/6442313.html

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