全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

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

[Windows VPS] CentOS 7 怎么关闭防火墙 ?

[复制链接]
发表于 2017-4-26 11:19:02 | 显示全部楼层 |阅读模式

之前是用这2条命令关闭防火墙

  1. systemctl stop firewalld.service#停止firewall

  2. systemctl disable firewalld.service#禁止firewall开机启动
复制代码


刚刚新安装了一个 CentOS 7  ,运行这个命令提示 :

  1. [root@ccav ~]# systemctl stop firewalld.service
  2. Failed to stop firewalld.service: Unit firewalld.service not loaded.
  3. [root@ccav ~]# systemctl disable firewalld.service
  4. Failed to execute operation: Access denied
  5. [root@ccav ~]#
复制代码


我想改 SSH 端口,但是好像还是有防火墙存在。
发表于 2017-4-26 11:22:24 | 显示全部楼层
service iptables stop
发表于 2017-4-26 11:22:50 来自手机 | 显示全部楼层
systemctl stop iptables

点评

不行。  发表于 2017-4-26 11:26
发表于 2017-4-26 11:25:17 | 显示全部楼层
chkconfig iptables off  开机关闭
 楼主| 发表于 2017-4-26 11:25:38 | 显示全部楼层
图王 发表于 2017-4-26 11:22
service iptables stop

不行。

  1. [root@ccav ~]# service iptables stop
  2. Redirecting to /bin/systemctl stop  iptables.service
  3. Failed to stop iptables.service: Unit iptables.service not loaded.
  4. [root@ccav ~]#
复制代码

 楼主| 发表于 2017-4-26 11:27:20 | 显示全部楼层
coobar 发表于 2017-4-26 11:25
chkconfig iptables off  开机关闭

iptables 是 centos 6 的。


  1. [root@ccav ~]# chkconfig iptables off
  2. 服务 iptables 信息读取出错:没有那个文件或目录
  3. [root@ccav ~]#
复制代码
优秀的苦瓜 该用户已被删除
发表于 2017-4-26 11:39:26 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2017-4-26 11:44:06 | 显示全部楼层
systemctl status firewalld出的什么?
 楼主| 发表于 2017-4-26 12:08:01 | 显示全部楼层
我是人 发表于 2017-4-26 11:44
systemctl status firewalld出的什么?

Unit firewalld.service could not be found.
发表于 2017-4-26 12:10:59 | 显示全部楼层
1、关闭防火墙:sudo systemctl stop firewalld.service
2、关闭开机启动:sudo systemctl disable firewalld.service
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-29 19:45 , Processed in 0.078069 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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