centos 之所以叫centos 最主要是因为centos的稳定+对企业的友好
而防火墙确实centos的一大特色,当然不是说其他的linux版本,或者其他系统没有防火墙,是因为centos的防火墙更有特点而已
而写这篇博客是因为,自己写了个python项目,在centos7下很顺畅的运行,但是本机能访问,局域网都不能访问,最终确定了是防火墙的问题!
systemctl start firewalld.service systemctl stop firewalld.service firewall-cmd --state netstat -lnpt netstat -lnpt |grep 5672 ps 6832 kill -9 6832
firewall-cmd --permanent --zone=public --add-port=8080/tcp firewall-cmd --permanent --zone=public --remove-port=8080/tcp
firewall-cmd --permanent --zone=public --add-port=8080/udp firewall-cmd --permanent --zone=public --remove-port=8080/udp
firewall-cmd --reload
firewall-cmd --zone=public --list-ports
|