Redirecting to binsystemctl restartiptables.service Failed to restart iptables.service: Unit not

    xiaoxiao2022-07-07  139

    参考链接:https://blog.csdn.net/striverchuiying/article/details/81479308

     

    在centOS 7系统中运行

    service iptables stop

    发现出错

    解决办法

    1. 使用systemctl

    systemctl [start|stop|restart|save|status] iptables.service

    2. 安装iptables-services

    切换到root用户下,执行:

    yum install iptables-servicessystemctl enable iptables.service //设置开机启动

    之后就可以使用以下指令了:

    service iptables [start|stop|restart|save|status]

    最新回复(0)