查询防火墙是否开启
systemctl status firewalld
查询防火墙开放端口
firewall-cmd --list-ports
开放80端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
重启
firewall-cmd --reload
验证是否成功
firewall-cmd --list-ports
iptables
vim /etc/sysconfig/iptables >> -A INPUT -p tcp -m tcp --dport 8888 -j ACCEPT /etc/init.d/iptables restart
标签:iptables,--,cmd,firewalld,tcp,firewall From: https://www.cnblogs.com/floud/p/16639843.html