CentOS7关闭防火墙
来源:互联网 发布:3d展示软件 编辑:程序博客网 时间:2024/06/07 02:56
CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下
--查看防火墙状态:
systemctl status firewalld.service
或者
systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
(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 #设置防火墙开机启动
最后重启系统使设置生效即可。
(3)切换到iptables后,如果想关闭防火墙:
关闭命令: service iptables stop
永久关闭防火墙:chkconfig iptables off
两个命令同时运行,运行完成后查看防火墙关闭状态
service iptables status
阅读全文
0 0
- centos7如何关闭防火墙!
- centos7 关闭防火墙
- centos7 关闭防火墙
- centos7关闭防火墙
- CentOS7.0 关闭防火墙
- CentOS7 关闭防火墙
- CentOS7关闭防火墙
- centos7关闭防火墙
- 关闭Centos7的防火墙
- Centos7 关闭防火墙
- Centos7 关闭防火墙设置
- Centos7 关闭防火墙
- centos7 关闭防火墙
- centos7关闭防火墙
- centos7关闭防火墙
- centOS7如何关闭防火墙
- Centos7 关闭防火墙
- CentOS7.0 关闭防火墙
- ERROR Error when sending message to topic test_topic with key: null, value: 3 bytes……:部署Kafka时遇到两个问题
- 使用Okhttp执行put空的RequestBody
- java.lang.NoSuchFieldError: INSTANCE 解决方法
- java中指定编码操作文本文件
- 想要控制Linux GPIO初始状态的看过来
- CentOS7关闭防火墙
- 旗正规则引擎内存表出错的原因及解决方法分享
- Day12-40.return
- js接收thinkphp传递的参数
- RHEL环境搭建-NginxTomcatJavaDubboRabbitMQRedisNexusMySQL
- OC : NSNumberFormatter ( 数字格式化)
- 0824 Java基础知识小结
- Day12-41.break and continue
- thinkphp 同时上传视频和图片,并对图片进行分组