Centos7 关闭防火墙
2016-05-13 16:50
417 查看
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 KVM 基本安装过程
- CentOS下配置VNC
- linux服务器上定时备份 mysql 数据库
- Linux背景
- Linux下源码安装php7.0.6
- Linux命令行执行.sql文件及常用sql命令
- Linux kernel源码阅读笔记2-2.6版本调度器sched.c功能
- Linux curl命令参数详解
- Linux下安装Nodejs
- centos 例行性工作转发外部邮箱
- linux 设置IP DNS 网关
- linux 设置IP DNS 网关
- CentOS tar加解压文件
- 初识Linux
- CentOS 安装 JDK
- cobbler 远程安装带图像化的centos服务器 kickstart文件
- centos 下运行程序出现error while loading shared libraries cannot open shared object file错误
- Linux查看进程运行的完整路径
- 珠海全志公司的 Linux 内核遗留了后门
- linux下实现桥接联网