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. Docker Ubuntu容器安装ping

    apt-get update apt-get install iputils-ping apt-get install net-tools

  2. fastadmin 中 selectpage.js位置

    备注: //特殊字段处理 因为接收到input中的属性名会被转成小写所以增加了一对键值 keyField: 'primarykey' $.each({data: 'source', keyField: ...

  3. 【异常】postman能够请求成功获取到参数,前端请求的却请求不到

    1 前端联调的时候,反馈自己的参数没有生效,无论传递任何参数都是一样的结果 盯了一下日志发现 postman请求的是   :{"getParameter":{"provi ...

  4. OSG入坑之路[转]

    转载自:https://segmentfault.com/a/1190000010506374?utm_source=tag-newest osg插件原理:https://blog.csdn.net/ ...

  5. KeyError: 'pass_ticket'

    使用wxpy模块对接微信登陆,在扫描程序弹出二维码后,使用手机微信扫描登陆之后报KeyError: 'pass_ticket'. 原因就是微信禁止该账号登陆微信网页版,如下图: 所以,去找到能让账号登 ...

  6. 卸载CUDA和cuDNN

    卸载CUDA和cuDNN 1.卸载CUDA 本教程只针对对于.run方式安装的,其他的没有进行测试 打开终端,输入sudo /usr/local/cuda-10.0/bin/uninstall_cud ...

  7. Hive压缩和存储(十二)

    压缩和存储 1. Hadoop压缩配置 1) MR支持的压缩编码 压缩格式 工具 算法 文件扩展名 是否可切分 DEFAULT 无 DEFAULT .deflate 否 Gzip gzip DEFAU ...

  8. 【NOIP2012】同余方程

    原题: 求关于xx的同余方程ax≡1(mod b)的最小正整数解. 裸题 当年被这题劝退,现在老子终于学会exgcd了哈哈哈哈哈哈哈哈 ax≡1(mod b) => ax=1+by => ...

  9. Summer training #7

    B:读懂题意模拟 #include <bits/stdc++.h> #include <cstring> #include <iostream> #include ...

  10. err:LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLE

    err:LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLE err:LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLE err:LIBUSB_S ...