root用户:
首先查看系统版本:
cat /etc/redhat-release
以CentOs7为例,执行systemctl status firewalld
首先,查看Active,此处显示已关闭防火墙启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld
开机禁用 : systemctl disable firewalld
开机启用 : systemctl enable firewalld
CentOs6
启动: service iptables start
关闭: service iptables stop
查看状态: service iptables status
永久关闭防火墙 : chkconfig iptables off