6.5 linux内核管理 : 内核防火墙
RedHat体系
centos6系统 没有systemctl
$ service iptables stop //关闭防火墙
$ chkconfig iptables off
$ chkconfig | grep iptables //查看防火墙配置
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
centos7支持【和ubuntu一致】
1.查看防火墙的状态
firewall-cmd --state
running 和 not running
2.关闭防火墙
systemctl stop firewalld.service
3.#禁止firewall开机启动
systemctl disable firewalld.service
Debian体系
1.查看防火墙的状态
firewall-cmd --state
running 和 not running
2.关闭防火墙
systemctl stop firewalld.service
3.#禁止firewall开机启动
systemctl disable firewalld.service
注意:如果命令没有,执行
sudo apt-get install firewalld