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. PHP如何将session保存到memcached中?如何分布式保存PHP session

    session_set_save_handler无关的memcached保存session的方法 在memcached服务器上 1)下载memcached #wget http://memcached ...

  2. C和指针 第十二章 使用结构和指针 双链表和语句提炼

    双链表中每个节点包含指向当前和之后节点的指针,插入节点到双链表中需要考虑四种情况: 1.插入到链表头部 2.插入到链表尾部 3.插入到空链表中 4.插入到链表内部 #include <stdio ...

  3. Ubuntu 登录锐捷 网卡被禁用 网口灯不亮解决

    cd rjsupplicantchmod +x rjsupplicant.sh sudo ./rjsupplicant.sh -u username-p password -d 1 sudo serv ...

  4. configparser模块

    configparser模块 echo   $@ $# $? $* configparse用于处理特定格式的文件,其本质上利用open来操作文件(比如配置文件) **********配置文件***** ...

  5. Oracle分析函数(一)

    一.总体介绍 分析函数如何工作 语法 FUNCTION_NAME(<参数>,…) OVER (<PARTITION BY 表达式,…> <ORDER BY 表达式 < ...

  6. SQL中rowcount与@@rowcount

    rowcount的用法: rowcount的作用就是用来限定后面的sql在返回指定的行数之后便停止处理,比如下面的示例, select * from 表A 这样的查询只会返回表A中的前10条数据.它和 ...

  7. SQL Server 2008 R2 企业版/开发版/标准版(中英文下载,带序列号)

    一. 简体中文 1. SQL Server 2008 R2 Developer (x86, x64, ia64) – DVD (Chinese-Simplified) File Name: cn_sq ...

  8. push 到下一界面明显卡顿的现象

    今天搭建界面,界面间的跳转使用了 push方法,结果发现界面间转换时有明显的卡顿现象,并没有做过数据请求之类的处理,所以感觉好神奇.以前好像也遇到过,当时在push 到的下级界面加个背景色.现在重新这 ...

  9. October 20th Week 43rd Thursday, 2016

    Now, it's clear. OPPO R9s 这一刻 更清晰. I want a new mobile phone, because the one I am using is broken. ...

  10. CUDA代码移植

    如果CUDA的代码移植,一个是要 include文件夹对不对,这个是.h文件能否找到的关键,另一个就是lib,这个是.lib文件能否找到的关键.具体检查地方,见下头. include: lib: