Centos7 关闭防火墙
2015-07-28 14:50
211 查看
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 #设置防火墙开机启动
最后重启系统使设置生效即可。
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 #设置防火墙开机启动
最后重启系统使设置生效即可。
相关文章推荐
- linux下mysql的root密码忘记解决方法
- linux(CentOS)下Mrtg的安装詳解
- linux文件压缩与打包
- Windows远程连接Linux
- 利用grep 比较两个文件的异同
- 嵌入式linux之LCD驱动记录
- Linux显示中文乱码解决方法
- Linux grep命令详解
- linux mysql php-frm php 配置文件
- Linux SMB命令使用小结
- 使用异步 I/O 大大提高应用程序的性能
- Linux中的特殊权限s、t、i、a
- linux 基本命令
- vi文件搜索某个关键字
- linux新手入门常用文件以及系统操作方法
- 理解 Linux CPU 负载 1分5分15分
- Linux64位操作系统(CentOS6.6)上如何编译spark1.3
- 克隆的CentOS网卡物理地址错误问题!
- linux 查看进程的命令2(ps)
- linux driver 简单实例