CentOS 7.*+

  1. 查看防火墙状态

    systemctl status firewalld.service
  2. 关闭防火墙并禁止开机自启

    systemctl stop firewalld.service
    systemctl disable firewalld.service

CentOS 6.*

  1. 查看防火墙状态

    service iptables status
  2. 关闭防火墙并禁止开机自启

    service  iptables stop
    chkconfig iptables off

Ubuntu and Debian

  1. 查看防火墙状态

    sudo ufw status
  2. 关闭防火墙并禁止开机自启

    sudo ufw disable
感谢阅读,如需交流可通过邮件与我沟通:hczhang.cn@gmail.com