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. UVA-11991 Easy Problem from Rujia Liu?

    Problem E Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for ...

  2. C和指针 第五章 习题

    下列输出的值: #include <stdio.h> int func(){ static int count = 1; return ++count; } int main() { in ...

  3. Java Native Interface 编程系列一

    本文是<Java Native Interface Programmer's Guide and Specification>的读书笔记 Java Native Interface可以让编 ...

  4. Android多线程通信机制

    掌握Android的多线程通信机制,我们首先应该掌握Android中进程与线程是什么. 1. 进程 在Android中,一个应用程序就是一个独立的进程(应用运行在一个独立的环境中,可以避免其他应用程序 ...

  5. 交叉编译fftw

    交叉编译 fftw 使用的源码是 fftw-3.2.2-arm.tar.gz 新塘平台arm ./configure --prefix=/usr/local/fftw_arm --host=arm-l ...

  6. Unity3D LuaComponent(基于ulua)

    LuaComponent可以支持配一个需要执行在这个gameObject上的lua脚本,并且每个gameObject上的lua都是一个实例 using UnityEngine; using LuaIn ...

  7. Python: Win7下使用 pip install lxml 无法安装lxml?

    1.在网址 http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 下,搜索lxml,下载Python对应的lxml版本.如下图: 2.打开cmd,进入到lxm ...

  8. char 型二维数组

    char FutureFunc[][16] = {"XMA","ZIG","PEAK","PEAKBARS"," ...

  9. Python常见问题及资料收集

    1,字符编码处理: http://bbs.chinaunix.net/thread-1431029-1-1.html

  10. linux下bus、devices和platform的基础模型

    转自:http://blog.chinaunix.net/uid-20672257-id-3147337.html 一.kobject的定义:kobject是Linux2.6引入的设备管理机制,在内核 ...