目录

Destination Host Prohibited

目录
AI 摘要
Based on ChatGPT 3.5
这篇文章介绍了如何解决“Destination Host Prohibited”的问题。问题出现的原因是由于服务器上的iptables配置导致的。文章给出的解决方法是检查filter表中的FORWARD链,查看是否包含有相关的行,如果有则删除该行。作者提供了删除该行的命令示例。
1
2
ping 1.1.1.1
From 1.1.1.1 icmp_seq=1 Destination Host Prohibited

出现这个问题原因是因为服务器上 iptables 配置原因造成的。

干脆点的话,直接

1
sudo apt remove iptablels

其他解决方法:
检查 filter 表中的 FORWARD 链

1
iptables -t filter --list

看看结果中是否有这一句

1
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

如果有,就删除它

1
iptables -L INPUT --line-numbers 

找到这一行的行号,我的主机上显示为 11 行

执行删除命令,删除第 11 行

1
iptables -D INPUT 11 #-D是删除参数