您的位置:首页 > 运维架构 > Linux

CentOS7 关闭防火墙

2016-02-24 15:24 381 查看
CentOS7 的防火墙配置跟以前版本有很大区别,经过大量尝试,终于找到解决问题的关键

CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样。按如下方便配置防火墙:

1、关闭防火墙:
sudo
systemctlstop firewalld.service




2、关闭开机启动:
sudo
systemctldisable firewalld.service




3、安装iptables防火墙

执行以下命令安装iptables防火墙:
sudo
yum
install
iptables-services


?

4、配置iptables防火墙,打开指定端口(具体跟以前版本一样,网上介绍很多,这里不多介绍了)

5. 设置iptables防火墙开机启动:
sudo
systemctl
enable
iptables


?

OK了,根据配置的端口就可以访问了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: