需求背景
系统为Rocky Linux 8,需要更新系统补丁。
上手
- 执行系统更新
sudo dnf update
结果
网站无法访问
问题排查
1.检查是否可以ping通
:
ping www.og.ac.cn
=》有响应数据,说明ping正常
2.使用curl进行详细测试
curl -v https://www.og.ac.cn
=》提示No route to host,、查找资料表明很有可能时防火墙问题
3.检查防火墙状态
sudo systemctl status firewalld
=》防火墙是正常开启的,那么看看对应的端口是否已开启。
4.检查防火墙端口开启状况
sudo firewall-cmd --list-ports
可以看到防火墙没有放开443的tcp端口,加上就可以了
5.防火墙添加443/tcp端口放行
sudo firewall-cmd --add-port=443/tcp