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