liunx 防火墙的问题
启动:systemctl start firewalld
查看状态:systemctl status firewalld
停止: systemctl stop firewalld
禁用: systemctl disable firewalld
重启防火墙,安装命令两种方式
sudo systemctl reload firewalld
firewall-cmd --reload
操作步骤
(查看端口是否开放)
firewall-cmd --query-port=80/tcp
(设置80端口开放出来)
firewall-cmd --zone=public --add-port=80/tcp --permanent
netstat -ntlp //查看当前所有tcp端口