1 systemctl status firewalld.service #检测是否开启了firewall 2 3 systemctl stop firewalld.service #关闭firewall 4 5 sytsemctl disable firewalld.service #禁止firewall开机自启
yum install iptables-services
vi /etc/sysconfig/iptables
systemctl restart iptables.service #重启iptables
systemctl enable iptables.service #设置开机启动iptables
1 vi /etc/selinux/config 2 3 #SELINUX=enforcing #注释掉 4 5 #SELINUXTYPE=targeted #注释掉 6 7 SELINUX=disabled #增加 8 9 :wq! #保存退出 10 11 setenforce 0 #使配置立即生效