CentOS7 防火墙关闭

CentOS7 的防火墙配置跟以前版本有很大区别,经过大量尝试,终于找到解决问题的关键
CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样。按如下方便配置防火墙:
1、关闭防火墙:sudo systemctl stop firewalld.service
2、关闭开机启动:sudo systemctl disable firewalld.service
3、安装iptables防火墙
执行以下命令安装iptables防火墙:sudo yum install iptables-services
?
4、配置iptables防火墙,打开指定端口(具体跟以前版本一样,网上介绍很多,这里不多介绍了)
5. 设置iptables防火墙开机启动:sudo systemctl enable iptables
?
OK了,根据配置的端口就可以访问了 ——————— 本文来自 公司扫地僧 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/laotoumo/article/details/67632618?utm_source=copy

LEAVE A COMMENT