最新的CentOS 7防火牆已經更新爲firewalld。linux
爲了方便調試須要關閉防火牆和selinux。shell
1. 運行、中止、禁用firewalldspa
啓動:# systemctl start firewalld調試
查看狀態:# systemctl status firewalld 或者 firewall-cmd --statecode
中止:# systemctl disable firewalldget
禁用:# systemctl stop firewalldcmd
2.關閉SELINUXclass
在文件 /etc/selinux/config 修改防火牆
SELINUXTYPE = targeted
爲top
SELINUX = disabled