firewalld和netfilter
#setenforce 0 //臨時關閉selinux
#vi /etc/selinux/config //永久關閉selinux需要修改這個配置文件
將SELINUX=enforcing修改為SELINUX=disabled
#getenforce //查看selinux是否關閉
centos7之前使用netfilter防火墻
centos7開始使用firewalld防火墻
以下是在centos7上關閉firewalld防火墻,使用centos6上的netfilter防火墻
#systemctl disable firewalld //禁用firewalld
#systemctl stop firewalld //停止firewalld
#yum install -y iptables-services //yum安裝iptables-services
#systemctl enable iptables //啟用iptables
#systemctl start iptables //開啟iptables
#iptables -nvL //查看itables默認規則
關閉centos7上的firewalld,啟用centos6之前用的netfilter總結:
firewalld --> close / disable + stop
netfilter --> open --> yum安裝iptables-services --> enable iptables / start iptables
注意:真正的防火墻是netfilnet,而iptables僅僅是它的工具
轉載于:https://blog.51cto.com/13669226/2114250
總結
以上是生活随笔為你收集整理的firewalld和netfilter的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: nginx配置tomcat负载均衡,ng
- 下一篇: Spring源码-application