centos 6

关闭命令:  service iptables stop 
永久关闭防火墙:chkconfig iptables off

两个命令同时运行,运行完成后查看防火墙关闭状态 
        service iptables status

CentOS7 的防火墙配置跟以前版本有很大区别,经过大量尝试,终于找到解决问题的关键

CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样。按如下方便配置防火墙:

1、关闭防火墙:sudo systemctl stop firewalld.service

2、关闭开机启动:sudo systemctl disable firewalld.service

3、安装iptables防火墙

执行以下命令安装iptables防火墙:sudo yum install iptables-services

?

4、配置iptables防火墙,打开指定端口(具体跟以前版本一样,网上介绍很多,这里不多介绍了)

5. 设置iptables防火墙开机启动:sudo systemctl enable iptables

?

OK了,根据配置的端口就可以访问了

 

centos 6和centos7关闭防火墙的方法的更多相关文章

  1. redhat linux/CentOS 6/7 如何关闭防火墙?

    redhat linux/CentOS 6/7 如何关闭防火墙?关闭防火墙iptables的具体命令如下: 临时性的完全关闭防火墙,可以不重启机器(但是重启服务器后iptables防火墙服务会自动随系 ...

  2. centos7 关闭防火墙

    centos7 关闭防火墙 1.firewall相关的操作    查看防火墙状态 firewall-cmd    --state 关闭防火墙 systemctl  stop   firewalld.s ...

  3. CentOS7关闭防火墙方法

    在之前的版本中关闭防火墙等服务的命令是 service iptables stop /etc/init.d/iptables stop 在RHEL7中,其实没有这个服务 [root@rhel7 ~]# ...

  4. Centos7 关闭防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下 1.直接关闭防火墙 systemctl stop firewalld.service #停止firew ...

  5. Centos7 关闭防火墙(转)

    转载地址:http://www.cnblogs.com/silent2012/archive/2015/07/28/4682770.html CentOS 7.0默认使用的是firewall作为防火墙 ...

  6. Centos7关闭防火墙与selinux

    CentOS 7.0默认使用的是firewall作为防火墙 直接关闭防火墙 systemctl stop firewalld.service #停止firewall systemctl disable ...

  7. 转载-CentOS7关闭防火墙

    原文地址-http://www.cnblogs.com/silent2012/archive/2015/07/28/4682770.html CentOS 7.0默认使用的是firewall作为防火墙 ...

  8. CentOS7 关闭防火墙和selinux

    本文将简单介绍在CentOS7上如何临时和永久关闭防火墙和selinux. 关闭防火墙 # 查看防火墙状态 [root@localhost ~]# systemctl status firewalld ...

  9. iptables详解与Centos7 关闭防火墙

    http://www.cnblogs.com/metoy/p/4320813.html CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下 1.直接关闭防 ...

随机推荐

  1. dhcpd.conf例解

      ddns-update-style interim; //设置dhcp互动更新模式 ignore client-updates; //忽略客户端更新 #子网声明 subnet 192.168.12 ...

  2. 给Eclipse安装MinGW

    @2019-06-30 [小记] 安装完Eclipse后Toolchains只有Cross GCC,下载安装MinGW后添加系统环境变量即可

  3. linux获取某一个网卡的ipv4地址

    ip a show ens33 | grep inet | grep -v inet6 | awk '{print $2}' | awk -F '/' '{print $1}'

  4. Selenium3-浏览器与驱动对照

    在学selenium自动化测试时,遇到的第一个大问题便是浏览器版本.浏览器驱动版本与selenium的版本不对应,而无法驱动浏览器进行自动化操作. 收集了网上的一些技术文档,决定也整理一份相对较全面的 ...

  5. java8学习之Lambda表达式深入与流初步

    Lambda表达式深入: 在上一次[http://www.cnblogs.com/webor2006/p/8135873.html]中介绍Lambda表达式的作用时,其中说到这点: 如标红处所说,既然 ...

  6. openGL中的gl,glu,glut

    OpenGL函数库相关的API有核心库(gl).实用库(glu).辅助库(aux).实用工具库(glut).窗口库(glx.agl.wgl)和扩展函数库等.gl是核心,glu是对gl的部分封装.glx ...

  7. Java笔试题及答案

    1.下列不可作为java语言修饰符的是(D) A) a1 B) $1 C) _1 D) 11 答案:java标识符不能以数字开头,包含英文字母,数字,下划线以及$ 2.有一段java 应用程序,它的主 ...

  8. [Ahoi2009]self 同类分布

    1799: [Ahoi2009]self 同类分布 Time Limit: 50 Sec  Memory Limit: 64 MBSubmit: 2357  Solved: 1079[Submit][ ...

  9. 集成 jpush

    给 iOS 应用添加推送功能是一件比较麻烦的事情,本篇文章收集了集成 jpush-react-native 的常见问题,目的是为了帮助用户更好地排查问题 1. 收不到推送 确保是在真机上测试,而不是在 ...

  10. BBS-添加文章及文章中图片

    目录 BBS项目中的添加文章 BBS项目中的添加文章中的图片 BBS项目中的添加文章 1.添加文章的时候,我们需要特别注意的是这个地方需要利用到到BeautifulSoup这个模块,因为我们在inpu ...