Centos7 关闭防火墙



CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下



1、直接关闭防火墙



systemctl stop firewalld.service #停止firewall



systemctl disable firewalld.service #禁止firewall开机启动



2、设置 iptables service



yum -y install iptables-services



如果要修改防火墙配置,如增加防火墙端口3306



vi /etc/sysconfig/iptables



增加规则



-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT



保存退出后



systemctl restart iptables.service #重启防火墙使配置生效



systemctl enable iptables.service #设置防火墙开机启动



最后重启系统使设置生效即可

centos关闭防火墙的更多相关文章

  1. centos 关闭防火墙

    在centos上搭建了个服务器,本机可以访问,局域网无法访问 解决方案:关闭防火墙 sudo systemctl stop firewalld.service 令人恼火的是stop iptables之 ...

  2. CentOS 关闭防火墙和selinux

    1)关闭防火墙(每个节点) [Bash shell] 1 2 service iptables stop chkconfig iptables off 2)关闭selinux(重启生效) [Bash ...

  3. CentOS关闭防火墙&SELinux

    须知: 防火墙配置文件:/etc/sysconfig/iptables 查看防火墙状态:service iptables status 关闭防火墙:service iptables stop 关闭ip ...

  4. redhat或centos关闭防火墙并开启sshd服务

    使用putty连接虚拟机的redhat连不上时处理方案: 这里使用的是VMware Workstation,  将宿主机与虚拟机之间的网络使用 ‘桥接方式’: 1.关闭宿主机与虚拟机的防火墙, 在re ...

  5. Linux学习笔记之Linux Centos关闭防火墙

    # Centos6.x /etc/init.d/iptables stop chkconfig iptables off sed -i 's/SELINUX=enforcing/SELINUX=dis ...

  6. Hadoop集群搭建(四)~centos6.8关闭防火墙

    一.centos关闭防火墙 1,关闭防火墙.service iptables stop 2,关闭防火墙开机自启.chkconfig iptables off 3,查看防火墙状态.service ipt ...

  7. CentOS 7 关闭防火墙

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

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

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

  9. Linux实战案例(5)关闭Centos的防火墙

    1.检查防火墙的状态 [root@LxfN1 ~]# service iptables status表格:filterChain INPUT (policy ACCEPT)num target pro ...

随机推荐

  1. CPU思考

    线程高并发 会导致CPU load长,线程大运算量和大量线程 会导致CPU利用率高 因为CPU处理都是原子操作的,8核CPU在同一时刻最多也只能处理8个线程,但是因为处理的非常快,所以即使几万个简单线 ...

  2. Asp.Net Core--简单的授权

    翻译如下: 在MVC中授权通过控制AuthorizeAttribute属性及其各种参数.在最简单的应用AuthorizeAttribute属性控制器或行动限制访问控制器或操作任何身份验证的用户. 例如 ...

  3. Segment set

    题目大意: 在一个平面上,给定N根线段,若某条线段与另一条线段相交,则将它们归于同个集合,给定k,问第k条线段所在的集合中线段的数量. 题目分析: 问题主要考察计算几何和并查集. 首先我们要判断两条线 ...

  4. 2015安徽省赛 G.你来擒孟获

    http://xcacm.hfut.edu.cn/problem.php?id=1211 SPFA模板题目 最短路变种,从起点终点各找一次最短路相加 #include<iostream> ...

  5. 【MySQL】Create table 以及 foreign key 删表顺序考究。

    1.以下是直接从数据库导出的建表语句. 1 -- ---------------------------- 2 -- Table structure for files 3 -- ---------- ...

  6. SQL操作记录查看工具

    [1]SQL Server Profiler就是一个Sql的监视工具,可以具体到每一行Sql语句,每一次操作,和每一次的连接 [2] 做数据交互时,往往很难直观的看到最后在数据库中执行的SQL语句.此 ...

  7. SQL 创建随机时间的函数

    set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER function [dbo].[fn_Randtime] ( @begin_date datet ...

  8. asp.net mvc 多级文件夹

    ASP.NET MVC - 定制属于你自己的ViewEngine 标签: asp.netmvcstring引擎razorapplication 2012-07-26 14:17 5365人阅读 评论( ...

  9. oracle数据库安装完要做的事情。

    安装数据库客户端.这个在oracle官网可以下载安装(下载链接) 安装PL/SQL PL在下载 配置环境变量(这个比较重要,不配置PLSQL链接不到数据库) 配置的相关环境变量有: 变量名:oracl ...

  10. DTD文档模型和HTML基础

    html是超文本标记语言,现在常用到的2中文档格式是html5和XHTML 1.0 Transitiona(过渡). <!DOCTYPE html> <!--当前文档为html5-- ...