码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS7出现Unit iptables.service could not be found

时间:2019-08-23 11:59:09      阅读:381      评论:0      收藏:0      [点我收藏+]

标签:火墙   walle   图片   停止   init   restart   div   fir   enable   

CentOS7默认的防火墙不是iptables,而是firewalle.

出现此情况可能是iptables防火墙未安装。

#停止firewalld服务

systemctl stop firewalld

#禁用firewalld服务

systemctl mask firewalld

开启

systemctl unmask firewalld

安装iptables-services:

yum install iptables-services

设置开机启动:

systemctl enable iptables

systemctl [stop|start|restart] iptables
#or
service iptables [stop|start|restart]

service iptables save
#or
/usr/libexec/iptables/iptables.init save

然后

service iptables status

技术图片

开启: service iptables start

关闭: service iptables stop

CentOS7出现Unit iptables.service could not be found

标签:火墙   walle   图片   停止   init   restart   div   fir   enable   

原文地址:https://www.cnblogs.com/liugp/p/11399117.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!