Telnet:无法连接到远程主机

相关主题

  • SMTP服务器工作,但telnet到端口25不
  • 无法连接到SMTP服务器

问题

我有一个服务器运行Debian 3.2.65-1,我有一些问题,以连接其他服务器通过SMTP发送电子邮件在基于Drupal的Web应用程序。

我做的第一件事是用telnet将服务器夹住 ,结果是下面的消息。

命令行语法:

telnet smtp.mydomain.com 587

结果:

Trying XXX.XXX.XX.XXX... telnet: Unable to connect to remote host: Connection timed out 

谷歌search后阅读一些关于不同的解决scheme的post:

  1. 我可以从其他不同的机器连接到SMTP服务器。 所以我放弃了SMTP服务器作为问题的根源。
  2. 1上的声明使我认为​​这是一个防火墙问题。 然后,我检查了iptables

命令行语法:

iptables -L

结果:

 Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination 

我明白,服务器是开放的,它有没有规则的默认configuration。

  1. 我发现服务器有UFW,但没有运行。
  2. 在评论kasperd的意见之后:第3个评论

netstat -ntlp

结果:

 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:36990 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:6082 0.0.0.0:* LISTEN - tcp6 0 0 :::111 :::* LISTEN - tcp6 0 0 :::8080 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - tcp6 0 0 :::46645 :::* LISTEN - tcp6 0 0 :::22 :::* LISTEN - tcp6 0 0 :::443 :::* LISTEN - tcp6 0 0 ::1:6082 :::* LISTEN - 

任何想法如何解决它?

你的服务器没有监听端口587.我接受你认为你已经能够从其他机器连接到它,但我只能猜测,他们已经经历了某种透明的代理已经劫持连接邮件服务器types的服务,并把你送到一些本地的邮件服务器。

换句话说,无法连接到服务器的机器:587是告诉你的事实。 任何机器,声称他们可以对你说谎。