问题:查看防火墙状态时报错service iptables status

Unit iptables.service could not be found

解决方案

  在CentOS 7或RHEL 7或Fedora中防火墙由firewalld来管理,当然你可以还原传统的管理方式,或则使用新的命令进行管理。本文中将还原传统的管理方式。

  cd /etc/sysconfig

  ls -l

  没有查看到iptables文件,但存在ip6tables-config和iptables-config,本文中的linux为CentOS 7.6 ,CentOS 7默认没有了iptables文件。

Unit iptables.service could not be found

  安装iptables-services yum install iptables-services

  启动iptables systemctl enable iptables

        systemctl start iptables

  查看防火墙状态service iptables status

Unit iptables.service could not be found

  关闭防火墙 service iptables stop

Unit iptables.service could not be found

相关文章:

  • 2022-12-23
  • 2021-10-15
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2021-04-05
  • 2022-12-23
相关资源
相似解决方案