1.检查防火墙设置

firewall-cmd --state

2.关闭防火墙试试

systemctl stop firewalld.service

3.开启防火墙

systemctl start firewalld.service

4.添加端口

firewall-cmd --zone=public --add-port=80/tcp --permanent   (--permanent永久生效,没有此参数重启后失效)

5.重新载入

firewall-cmd --reload

6.查看

firewall-cmd --zone=public --query-port=80/tcp

7.删除端口

firewall-cmd --zone=public --remove-port=80/tcp --permanent

8.查看ipv4转发是否开启 1为开启,0为关闭

sysctl net.ipv4.ip_forward

9.改/etc/sysctl.conf文件,在最后添加net.ipv4.ip_forward=1:

执行下面生效

sysctl -p

安装tcping测试,tcping.exe下载后要放在C:\Windows\System32内

tcping下载地址tcping.exe - ping over a tcp connection

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐