jackalwb 2019-12-04
1.昨天碰到一个错误,linux下输入命令:service iptables restart时,
总会报下面一个提示
很简单,这句话的意思就是让你重定向到systemctl然后再启用,白话就是说用systemctl方式启动
解决方法:输入 systemctl start iptables
这个时候表示防火墙已经启动了,你在通过公网访问公网IP:8080就会出现一个小猫头像了
执行如下命令 systemctl stop firewalld systemctl mask firewalld 安装iptables-service yum install iptables-services 设置开机启动 systemctl enable iptables systemctl stop iptables systemctl start iptables systemctl restart iptables systemctl reload iptables 保存设置 service iptables save 欧克,在执行一下 service iptables start 应该就没有问题了
Redirecting to /bin/systemctl restart iptables.service 1,安装systemctl: yum install iptables-services 2,设置开机启动: systemctl enable iptables.service 然后就可以执行以下指令了: systemctl stop iptables systemctl start iptables systemctl restart iptables