Centos7设置关闭防火墙
CentOS 7.0默认使用的是firewall作为防火墙,要想使用iptables必须重新设置一下。
1.关闭防火墙
[root@localhost ~]# systemctl stop firewalld.service
2.禁止防火墙开机自启
[root@localhost ~]# systemctl disable firewalld.service
3.安装iptables service
yum -y install iptables-services
4.修改防火墙配置,如增加防火墙端口3306
vi /etc/sysconfig/iptables
增加以下规则
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
保存退出后
重启防火墙使配置生效
[root@localhost ~]# systemctl restart iptables.service
设置防火墙开机启动
[root@localhost ~]# systemctl enable iptables.service
重启系统使设置生效
[root@localhost ~]# reboot
注意:mysql安装后,如果不关掉防火墙,则远程不能连接成功。
Centos7设置关闭防火墙的更多相关文章
- CentOS7/6 关闭防火墙
CentOS6关闭防火墙使用以下命令, //临时关闭 service iptables stop //禁止开机启动 chkconfig iptables off CentOS7中若使用同样的命令会报错 ...
- Centos7永久关闭防火墙
Centos7永久关闭防火墙 查看防火墙状态: systemctl status firewalld.service 绿的running表示防火墙开启 执行关闭命令: systemctl stop f ...
- Centos7.0关闭防火墙
CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下 1.直接关闭防火墙 systemctl stop firewalld.service #关闭firew ...
- centos7上关闭防火墙
centos7上默认开启的是+firewalld,关闭了iptables 停止防护墙: systemctl stop firewalld.service 开机不启动: systemctl disabl ...
- 【Linux】CentOS7 打开关闭防火墙及端口
一.centos7版本对防火墙进行加强,不再使用原来的iptables,启用firewalld1.firewalld的基本使用启动: systemctl start firewalld查状态:syst ...
- 003 centos7中关闭防火墙
在centos7中,防火墙有了新的变化.下面是常用的几个命令. 1.查看状态 systemctl status firewalld 2.关闭防火墙 systemctl stop firewalld.s ...
- centos7 开放/关闭防火墙和端口
--------------------------------------------------------------防火墙----------------------------------- ...
- centos7上面关闭防火墙
CentOS 7.0默认使用的是firewall作为防火墙:若没有启用iptables 作为防火墙,则使用以下方式关闭防火墙: systemctl stop firewalld.service 关闭开 ...
- centos7下关闭防火墙
查看防火墙:systemctl status firewalld.service 关闭防火墙:systemctl stop firewalld.service 以上方式是暂时的,重启系统则防火墙仍然开 ...
随机推荐
- 回文自动机(BZOJ2565)
#include <cstdio> #include <cstring> #include <iostream> using namespace std; ][], ...
- javascript数据类型判断
javascript基本数据类型:原始类型 和 引用类型 原始类型(简单数据类型):String,Number,Boolean,Undefined,Null,Symbol(ES6新增) 引用类型( ...
- url 中 # ? & 的作用
1. # 10年9月,twitter改版.一个显著变化,就是URL加入了"#!"符号.比如,改版前的用户主页网址为http://twitter.com/username改版后,就变 ...
- spring mvc 项目聚合
创建一个maven 项目当父项目 创建时选择默认就可以 创建完成后 修改 pom.xml文件 把 packaging 的war改为pom <modelVersion>4.0.0</ ...
- Dijkstra的双栈算术表达式的求值算法
例如需要计算 ( 1 + ( ( 2 + 3 ) * ( 4 * 5 ) ) ) 我们以字符串的形式输入该表达式,利用两个栈来完成这个操作,其中一个栈保存运算符,一个栈保存操作数,过程是这样的: 表 ...
- UI: 标题栏
TitleBarDemo.xaml <Page x:Class="Windows10.UI.TitleBarDemo" xmlns="http://schemas. ...
- tensrflow python [defunct]
在ubuntu上面安装了GPU版本的tensorflow后,很容易碰到zombie thread 的问题,无法正常关闭tensorflow的线程,用ps aux|grep python可以看到 pyt ...
- php.ini 中文注释
这个文件控制了PHP许多方面的观点.为了让PHP读取这个文件,它必须被命名为 ; ´php.ini´.PHP 将在这些地方依次查找该文件:当前工作目录:环境变量PHPRC ; 指明的路径:编译时指定的 ...
- Example: Encoded SNMP Message - SNMP Tutorial
30.11 Example Encoded SNMP Message The encoded form of ASN.1 uses variable-length fields to represen ...
- 如何学好JAVA编程
我的思路: 1.我觉得先学学JSP,用纯JSP做个日记本简单的小系统,纯粹从语言层面上了解一些基 础知识,把tomcat玩熟了,就用记事本编就行,主要是熟悉,能够理解jsp运行机制.然 ...