linux下执行防火墙相关指令报错:Redirecting to /bin/systemctl restart iptables.service


 

安装systemctl:
yum install iptables-services 设置开机启动 systemctl enable iptables.service 如果报错:Failed to start IPv4 firewall with iptables. 因为centos7默认的防火墙是firewalld防火墙,不是使用iptables,因此需要先关闭firewalld服务,或者干脆使用默认的firewalld防火墙。 关闭firewalld: systemctl stop firewalld systemctl mask firewalld 开启443端口 iptables -A INPUT -p tcp --dport 443 -j ACCEPT 保存规则 service iptables save 开启服务 systemctl restart iptables.service


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM