在 CentOS 系统中,防火墙服务的名称取决于系统版本:
firewalld)sudo systemctl stop firewalld
sudo systemctl disable firewalld
sudo systemctl status firewalld
✅ 状态显示 inactive (dead) 表示已停止
iptables)sudo service iptables stop
sudo chkconfig iptables off
如果你只是临时测试,可只执行 stop,不执行 disable。
cat /etc/centos-release
如需我帮你 只开放某个端口(如 80、443、3306),可以告诉我。