CentOS 7.*+
查看防火墙状态
systemctl status firewalld.service
关闭防火墙并禁止开机自启
systemctl stop firewalld.service systemctl disable firewalld.service
CentOS 6.*
查看防火墙状态
service iptables status
关闭防火墙并禁止开机自启
service iptables stop chkconfig iptables off
Ubuntu and Debian
查看防火墙状态
sudo ufw status
关闭防火墙并禁止开机自启
sudo ufw disable