centos防火墙开启、关闭、查看状态。

淡淡的烟草味﹌ 2024-04-18 21:14 214阅读 0赞

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

本文链接: https://blog.csdn.net/DH_SIR/article/details/79244059

一、.对于centos7自带的防火墙的相关指令
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
systemctl status firewalld.service #查看firewall的状态

二、iptables防火墙的相关状态
关闭虚拟机防火墙:
关闭命令: service iptables stop
永久关闭防火墙:chkconfig iptables off
两个命令同时运行,运行完成后查看防火墙关闭状态
service iptables status
1 关闭防火墙—–service iptables stop
2 启动防火墙—–service iptables start
3 重启防火墙—–service iptables restart
4 查看防火墙状态–service iptables status
5 永久关闭防火墙–chkconfig iptables off
6 永久关闭后启用–chkconfig iptables on

作为一个小笔记,方便自己和大家查看。。。

发表评论

表情:
评论列表 (有 0 条评论,214人围观)

还没有评论,来说两句吧...

相关阅读