CentOS 配置防火墙操作实例(启、停、开、闭端口):
注:防火墙的基本操作命令:
查询防火墙状态:
[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<回车>
<a href="https://s5.51cto.com/wyfs02/M00/9C/6D/wKiom1lwT1_gXKpOAAA4Lx3mmG4465.png" target="_blank"></a>
<a href="https://s5.51cto.com/wyfs02/M00/9C/6D/wKioL1lwT2CBP9qaAAArsG72TeQ429.png" target="_blank"></a>
<a href="https://s4.51cto.com/wyfs02/M01/9C/6D/wKiom1lwT2CR32b8AABZt7kGcP4493.png" target="_blank"></a>
<a href="https://s5.51cto.com/wyfs02/M01/9C/6D/wKiom1lwT2HTU3XuAAA8anZfvj4809.png" target="_blank"></a>
<a href="https://s4.51cto.com/wyfs02/M01/9C/6D/wKioL1lwT2GTMO65AABP2RkUyj8080.png" target="_blank"></a>
本文转自 是阿杰啊 51CTO博客,原文链接:http://blog.51cto.com/jschinamobile/1949319