阿里云机器telnet smtp.163.com 25 报 Connection timed out

问题描述:

一批阿里云机器,发现其中一部分机器没有办法访问smtp.qiye.163.com服务器。相应的业务(docker容器部署)出现报错,在容器里面和宿主机上执行 telnet smtp.qiye.163.com 25 均出现了报错。
报错信息如下:
[root@new ~]# telnet smtp.qiye.163.com 25
Trying 123.125.50.10...
telnet: connect to address 123.125.50.10: Connection timed out
Trying 123.125.50.11...
telnet: connect to address 123.125.50.11: Connection timed out

[root@new ~]# ping 123.125.50.10
PING 123.125.50.10 (123.125.50.10) 56(84) bytes of data.
64 bytes from 123.125.50.10: icmp_seq=1 ttl=52 time=36.2 ms
64 bytes from 123.125.50.10: icmp_seq=2 ttl=52 time=36.1 ms
64 bytes from 123.125.50.10: icmp_seq=3 ttl=52 time=36.1 ms
64 bytes from 123.125.50.10: icmp_seq=4 ttl=52 time=36.1 ms
64 bytes from 123.125.50.10: icmp_seq=5 ttl=52 time=36.1 ms
^C
--- 123.125.50.10 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 36.170/36.187/36.232/0.209 ms

[root@iZwz96060sxkql7ghg525zZ ~]# ping 123.125.50.11
PING 123.125.50.11 (123.125.50.11) 56(84) bytes of data.
64 bytes from 123.125.50.11: icmp_seq=1 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11: icmp_seq=2 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11: icmp_seq=3 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11: icmp_seq=4 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11: icmp_seq=5 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11: icmp_seq=6 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11: icmp_seq=7 ttl=51 time=38.7 ms
^C
--- 123.125.50.11 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6009ms
rtt min/avg/max/mdev = 38.606/38.704/38.768/0.050 ms

[root@new ~]# ping smtp.qiye.163.com
PING smtp.qiye.163.com (123.125.50.11) 56(84) bytes of data.
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=1 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=2 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=3 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=4 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=5 ttl=51 time=38.6 ms
^C
--- smtp.qiye.163.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 38.631/38.699/38.770/0.182 ms

[root@new ~]# telnet 123.125.50.11 25
Trying 123.125.50.11...
telnet: connect to address 123.125.50.11: Connection timed out

原因分析:

1、查看问题机器本身的防火墙

[root@new ~]# systemctl status firewalld   #检查了问题机器的防火墙,是关闭的
● firewalld.service - firewalld - dynamic firewall daemon
  Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
  Active: inactive (dead) since Wed 2018-01-31 15:52:28 CST; 2 months 6 days ago
    Docs: man:firewalld(1)
 Process: 27972 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 27972 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[root@new ~]#

2、换端口访问,发现将25端口换成465端口,就是可以正常访问的:
[root@new ~]# telnet smtp.qiye.163.com 465
Trying 123.125.50.10...
Connected to smtp.qiye.163.com.
Escape character is '^]'.
^C^CConnection closed by foreign host.
[root@new ~]#

最后参考https://www.v2ex.com/amp/t/393296文档发现可能是因为阿里云过滤掉了25端口。

解决方法:

联系阿里云售后,对方提供了手动申请解封25端口的方法:​​https://help.aliyun.com/knowledge_detail/56130.html​​  需手动申请解封25端口

  • 17
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值