本篇文章重点为大家讲解一下Centos中配置防火墙具体方法,有需要的小伙伴可以参考一下。
防火墙的基本操作命令
1. 查询防火墙状态:
[root@localhost ~]# service iptables status2. 开启防火墙:
[root@localhost ~]# service iptables start3. 关闭防火墙:
[root@localhost ~]# service iptables stop4. 重启防火墙:
[root@localhost ~]# service iptables restart5. 永久关闭防火墙:
[root@localhost ~]# chkconfig iptables off6. 永久关闭后开启防火墙:
[root@localhost ~]# chkconfig iptables off补充
编辑/etc/sysconfig/iptables文件,可以配置不同端口的对外提供服务。
文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/216090.html<





