计算机网络/计算机科学与应用/系统/运维/开发

CentOS7 防火墙相关命令

Centos7 防火墙 firwwalld 相关命令:


# 查看防火墙相关状态

systemctl status firewalld.service 


# 关闭防火墙

systemctl stop firewalld 


# 启动防火墙

systemctl start firewalld 


# 开机自动开启防火墙

systemctl enable firewalld 


# 开机自动关闭防火墙

systemctl disable firewalld 


# 查看防火墙状态

systemctl status firewalld.service 


# 查看防火墙是否开机自动启动

systemctl list-unit-files|grep firewalld 


Centos6中 临时关闭防火墙:

#  /etc/init.d/iptables stop

#  /etc/init.d/iptables  status


永久关闭防火墙

# chkconfig  iptables off

# chkconfig --list |grep iptables


人各有命,但命运也从来不是随机发牌,而是每个人主动选择的结果。

评论

^