突然发现一个vps上的aria2无法访问。关闭iptables,一切正常。检查iptables端口。如下图:
注意reject-with icmp-host-prohibited,这句在80和6800端口上面,所以执行到reject-with icmp-host-prohibited后,后面端口不会放行。
解决方法:
先删除reject-with icmp-host-prohibited。
iptables -L INPUT --line-numbers iptables -D INPUT 7
然后再把reject-with icmp-host-prohibited加回去,放在最后。
iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited service iptables save service iptables restart
重启iptables就好了。