全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 16145|回复: 10

Centos7如何添加防火墙端口或者关闭防火墙

[复制链接]
发表于 2015-7-26 14:05:12 | 显示全部楼层 |阅读模式


使用的是Vultr的机器,装的centos7系统。。。

service firewalld stop


CENTOS7把防火墙换成firewalld了,各种陌生 然后用上面的命令关闭后,端口还是不通

使用telnet还是不通。。。


禁用seLinux后,还是不行。求大家告诉下到底是为什么啊。
发表于 2015-7-26 14:06:16 | 显示全部楼层
centos7 好像不是用service的,挺BT挺长的一个
 楼主| 发表于 2015-7-26 14:10:19 | 显示全部楼层
HXS 发表于 2015-7-26 14:06
centos7 好像不是用service的,挺BT挺长的一个

systemctl stop firewalld  这个吗???也没用
发表于 2015-7-26 14:13:57 | 显示全部楼层
看下iptables吧

说到底firewalld还是用的iptables
 楼主| 发表于 2015-7-26 14:20:36 | 显示全部楼层
雨宫音羽 发表于 2015-7-26 14:13
看下iptables吧

说到底firewalld还是用的iptables

iptables配置文件都没有。。。。
发表于 2015-7-26 14:26:19 | 显示全部楼层

l]

本帖最后由 wmfy808 于 2015-7-26 14:27 编辑

1、关闭firewall:

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动


http://www.woai.it/335.html
发表于 2015-7-26 14:26:32 | 显示全部楼层
Miss 发表于 2015-7-26 14:20
iptables配置文件都没有。。。。

不用看配置文件啊 看iptables -L 看看有什么规则
发表于 2015-7-26 14:35:00 | 显示全部楼层
  1. systemctl stop firewalld
  2. systemctl mask firewalld
  3. yum install -y iptables-services
  4. systemctl enable iptables
复制代码

关闭和屏蔽掉自带的firewall,安装iptables
 楼主| 发表于 2015-7-26 14:58:23 | 显示全部楼层
阔空晴云 发表于 2015-7-26 14:35
关闭和屏蔽掉自带的firewall,安装iptables

还是不行。。。哎,好蛋疼
发表于 2015-7-26 15:06:35 | 显示全部楼层
  1. systemctl stop firewalld.service
  2. systemctl disable firewalld.service
  3. yum install -y iptables-service
  4. iptables -F
  5. iptables -X
  6. iptables -Z
  7. iptables-save
  8. systemctl restart iptables.service
复制代码


搞定收工,睡觉。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-26 04:21 , Processed in 0.083171 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表