大佬教程收集整理的这篇文章主要介绍了CentOS下防火墙的基本操作命令,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
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<回车>
1、查看防火墙状态
[root@localhost ~]# service iptables status<回车>
2、编辑/etc/sysconfig/iptables文件。我们实例中要打开8080端口和9990端口
用编辑器打开/etc/sysconfig/iptables
4、保存/etc/sysconfig/iptables文件,并在终端执行
[root@localhost ~]# service iptables restart <回车>
[root@localhost ~]# service iptables status<回车>
7、其他端口的开放模式就是类似如此开放模式。
以上是大佬教程为你收集整理的CentOS下防火墙的基本操作命令全部内容,希望文章能够帮你解决CentOS下防火墙的基本操作命令所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。