Linux 系统关闭防火墙

文章目录

概述

今天分享一个简单的知识,虽然是简单,但是会经常用到,而且好容易忘记啊感觉,大概是因为我记性不好吧~ txtx

centos 6

查看防火墙的状态

service iptables status

[root@pgsql-1 ~]# service iptables status
iptables: Firewall is not running.

关闭防火墙

临时关闭

service  iptables stop

永久关闭

chkconfig iptables off

开启:

chkconfig iptables on

centos7

查看防火墙的状态

firewall-cmd --state

[root@localhost sas_data]# firewall-cmd --state
not running

关闭防火墙

临时关闭 :

systemctl stop firewalld

禁止开机启动:

systemctl disable firewalld

猜你喜欢

转载自blog.csdn.net/qq_43303221/article/details/83150164
今日推荐