1.Linux7.2设置防火墙关闭,打开,永久关闭
第一种方式:
systemctl stop firewalld.service
systemctl start firewalld.service
systemctl disable firewalld.service
第二种方式:
systemctl start firewalld
systemctl stop firewalld
centos7.3 上述方式可能无法开启,可以先
systemctl unmask firewalld.service
然后
systemctl start firewalld.service
2.Linux6.8设置防火墙关闭,打开,查看状态
service iptables stop
service iptables start
service iptables status
3.如何没有iptables命令还想使用iptables操作防火墙,则执行下面的命令
yum install iptables-services
然后就可以在Linux7.X中使用iptables进行启动关闭防火墙了
systemctl enable iptables
systemctl stop iptables
systemctl start iptables
systemctl restart iptables
systemctl reload iptables
如何解决了您的问题,还希望来JAVA WEB开发交流群:958923746,有问题欢迎共享,共同提升!