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 以上方式是暂时的,重启系统则防火墙仍然开 ...
随机推荐
- 【Python】[模块]使用模块,安装第三方模块
一个.py文件就称之为一个模块(Model)按目录来组织模块的方法,称为包(Package)每一个包目录下面都会有一个__init__.py的文件内置函数1.使用模块 导入模块 import sys ...
- 使用Extjs组件实现Top-Left-Main布局并且增加事件响应
每次在毕业答辩会上,看到同专业的同学只要是XXX管理系统,就是下图所示的界面,看来这中布局还是很受欢迎的(偷笑).接下来进入我们正题,在web项目无论是前端还是后台管理比较常见的布局就是Top-Lef ...
- 《Java EE 开发技术与案例教程》 这是一本好书啊:简洁精辟(相见恨晚)
第一章:Java EE 概述 1.get:JPA:Java Persistence API, 数据持久化API: JPA是一种ORM规范,它的实现实例:Hibernate.mybatis 2.Web ...
- 面向对象和面向过程的jquery版选项卡
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <script src ...
- 开发haproxy管理平台
1.说明:该脚本仅适用于Linux操作系统2.使用方法: 在该脚本同级目录下要创建一个名字叫做 haproxy 的文件 haproxy 文件内容如下 global log 127.0.0.1 loca ...
- Vue.js之v-for
v-for标签可以用来遍历数组,将数组的每一个值绑定到相应的视图元素中去,此外,v-for还可以遍历对象的属性,并且可以和template模板元素一起使用. 一.迭代数组 html: <ul&g ...
- C# 在类中反射
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Wind ...
- How to use FTP
Forward from: https://www.server-world.info/en/note?os=CentOS_7&p=ftp&f=2 Thanks for your sh ...
- d3 document
https://github.com/d3/d3/wiki/API--%E4%B8%AD%E6%96%87%E6%89%8B%E5%86%8C https://github.com/d3/d3/wik ...
- 如何阅读Java源码 阅读java的真实体会
刚才在论坛不经意间,看到有关源码阅读的帖子.回想自己前几年,阅读源码那种兴奋和成就感(1),不禁又有一种激动. 源码阅读,我觉得最核心有三点:技术基础+强烈的求知欲+耐心. 说到技术基础,我打个比 ...