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 以上方式是暂时的,重启系统则防火墙仍然开 ...
随机推荐
- Cordova Ionic AngularJS
实践分享:开始用Cordova+Ionic+AngularJS开发App http://www.cocoachina.com/webapp/20150707/12395.html
- c#编码转换
/// <summary> /// URL编码 /// </summary> /// <param name="Source"></par ...
- spring mvc 项目聚合
创建一个maven 项目当父项目 创建时选择默认就可以 创建完成后 修改 pom.xml文件 把 packaging 的war改为pom <modelVersion>4.0.0</ ...
- C#-和时间有关的计算代码、时间相减 得到天数、小时、分钟、秒差
asp.net(C#)时间相减 得到天数.小时.分钟.秒差 asp.net(C#)时间相减 得到天数.小时.分钟.秒差 DateTime dtone = Convert.ToDateTime( ...
- 教你一招:Word中的文字转换成表格,把表格转换成文字
在使用office软件时,常常会在Word中加入表格,这时候我们一般想到的是,建立表格,然后一格一格的填写;或者用Excel表格制作在复制到Word文档中.其实在Word中就可以将文本文档转换成电子表 ...
- Python 从零学起(纯基础) 笔记 之 深浅拷贝
深浅拷贝 1. import copy#浅拷贝copy.copy()#深拷贝copy.deepcopy()#赋值 = 2. 对于数字和字符串而言,赋值.浅拷贝和深拷贝无意义,因为其永远指向同一个 ...
- js-JavaScript高级程序设计学习笔记21 改善JavaScript性能的方法
第24章 最佳实践 1.性能 1.避免全局查找 将在一个函数中会用到多次的全局对象保存在局部变量.比如多次使用document.getElement...,可以首先var doc=document,把 ...
- bzoj2179: FFT快速傅立叶
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> ...
- Zabbix监控php-fpm status
开启php-fpm status php-fpm.conf pm.status_path = /statusx45 nginx.conf location ~ /(statusx45)$ { incl ...
- Unity 难点目录
1.mesh的任意切割.(难点) 2.扇形区域识别玩家.(解决) 3.NGUI横滑同时竖滑,或滑动同时点击冲突处理.(解决)