What's new

Can't telnet into smtp.gmail.com

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

KLM_SpitFire

Occasional Visitor
While trying to get my NAS to send email notifications through SMTP, I made an interesting discovery: none of my machines are able to telnet into smtp.gmail.com:587. This only occurs when they're connected to my ASUS RT-AC68U router running Merlin 380.65. If I connect, say, my laptop directly to the modem, I'm able to establish a connection. This inclines me to believe the router might be blocking communication, but I'm not sure how.

Here's the output of telnet while connected to the router:
Code:
~ ⍉ ➜ telnet smtp.gmail.com 587
Trying 173.194.214.108...
telnet: connect to address 173.194.214.108: Operation timed out
Trying 173.194.214.109...
telnet: connect to address 173.194.214.109: Operation timed out
Trying 2607:f8b0:400c:c0b::6c...
telnet: connect to address 2607:f8b0:400c:c0b::6c: No route to host
telnet: Unable to connect to remote host

Here's the output of telnet when I'm connected directly to the modem. (Note: I manually entered 'quit'):
Code:
~ ⍉ ➜ telnet smtp.gmail.com 587
Trying 173.194.214.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 smtp.gmail.com ESMTP t6sm4814445uag.25 - gsmtp
quit
221 2.0.0 closing connection t6sm4814445uag.25 - gsmtp
Connection closed by foreign host.
 
Last edited:
Try port 465
 
Try port 465
Code:
~ ⍉ ➜ telnet smtp.gmail.com 465
Trying 173.194.213.108...
telnet: connect to address 173.194.213.108: Operation timed out
Trying 173.194.213.109...
telnet: connect to address 173.194.213.109: Operation timed out
Trying 2607:f8b0:400c:c0a::6d...
telnet: connect to address 2607:f8b0:400c:c0a::6d: No route to host
telnet: Unable to connect to remote host

The same sort of issue also occurs when I try to telnet into 'smtp-mail.outlook.com'.
 
Code:
~ ⍉ ➜ telnet smtp.gmail.com 465
Trying 173.194.213.108...
telnet: connect to address 173.194.213.108: Operation timed out
Trying 173.194.213.109...
telnet: connect to address 173.194.213.109: Operation timed out
Trying 2607:f8b0:400c:c0a::6d...
telnet: connect to address 2607:f8b0:400c:c0a::6d: No route to host
telnet: Unable to connect to remote host

The same sort of issue also occurs when I try to telnet into 'smtp-mail.outlook.com'.

Does the output of the following command complete?
Code:
traceroute smtp.gmail.com
 
Does the output of the following command complete?
Code:
traceroute smtp.gmail.com
Code:
~ ⍉ ➜ traceroute smtp.gmail.com
traceroute: Warning: smtp.gmail.com has multiple addresses; using 173.194.213.109
traceroute to gmail-smtp-msa.l.google.com (173.194.213.109), 64 hops max, 52 byte packets
 1  rt-ac68u-e4d8 (192.168.1.1)  0.953 ms  0.758 ms  0.666 ms
 2  66.158.233.*** (66.158.233.***)  0.985 ms  0.990 ms  0.902 ms
 3  237-0-111-208-in-addr-arpa.omnispring.net (208.111.0.237)  1.443 ms  1.752 ms  1.482 ms
 4  157-10-111-208-in-addr-arpa.omnispring.net (208.111.10.157)  3.730 ms  3.880 ms  3.930 ms
 5  orl-edge-01.inet.qwest.net (65.158.222.65)  5.126 ms  5.991 ms  4.894 ms
 6  nap-edge-04.inet.qwest.net (67.14.29.166)  9.766 ms  9.594 ms  10.600 ms
 7  65.123.232.94 (65.123.232.94)  53.267 ms  53.488 ms  53.823 ms
 8  209.85.253.118 (209.85.253.118)  10.568 ms  10.433 ms  10.917 ms
 9  74.125.37.48 (74.125.37.48)  31.139 ms  31.796 ms  31.680 ms
10  74.125.37.25 (74.125.37.25)  31.547 ms
    74.125.37.67 (74.125.37.67)  30.969 ms  31.218 ms
11  * * *
12  vr-in-f109.1e100.net (173.194.213.109)  31.660 ms  30.967 ms  30.724 ms

(Note: Although the "66.158.233.***" isn't personally identifying, I manually inserted the "***" anyway for privacy reasons.)
 
I don't know whether this is your problem :rolleyes:; but some mail servers (and other servers for that matter) do a reverse DNS lookup on the client's IP address. If no reverse DNS entry exists (because the address is NAT'ed) it will eventually timeout the connection.

https://support.microsoft.com/en-us...erver-2003,-and-in-small-business-server-2003

This doesn't really help you, but could explain why it works when you are connected directly to your modem (and therefore have an external internet address).
 
I don't know whether this is your problem :rolleyes:; but some mail servers (and other servers for that matter) do a reverse DNS lookup on the client's IP address. If no reverse DNS entry exists (because the address is NAT'ed) it will eventually timeout the connection.

https://support.microsoft.com/en-us...erver-2003,-and-in-small-business-server-2003

This doesn't really help you, but could explain why it works when you are connected directly to your modem (and therefore have an external internet address).

He's failing to even connect tho, so that's not the problem - the telnet connection attempts has the same IP address as if he'd be doing it from the modem.

Port 25 is blocked in outbound by most ISPs, so you have to use 587. No idea why that wouldn't work tho.
 
I have no issues at all with telnet to smtp.gmail.com on 487 or 465 through the router on Comcast.

Connects immediately upon entry of the command.
 
I'm thinking it's a firewall problem on the workstation. The network would be different / trusted differently, and we don't know what kind of software firewall may be involved.
 
I'm thinking it's a firewall problem on the workstation. The network would be different / trusted differently, and we don't know what kind of software firewall may be involved.
All devices connected to the network are experiencing the same phenomena, so I'm not sure it's an issue with client-side firewalls. To be sure, I tested telnet with the laptop's firewall disabled... no dice; however, even with the firewall enabled, connecting my laptop to my roommate's router allowed me to telnet gmail.com.
 
Perhaps the WAN IP address associated with your router has been blacklisted by Google. Plugging your PC directly into the modem will give you a different WAN IP address.

Try cloning the MAC address of your PC on the router.
 
Logged into the router's admin console, went to WAN, clicked "MAC clone", and hit "apply". Tried to telnet and still no luck :(

Sent from my Nexus 6 using Tapatalk
 
Last edited:
One thing - go to your google account - and see what's happening there... there's a good chance that something has been red-flagged, and they will block access until it is resolved.

https://myaccount.google.com/
 
Apparently my ISP had blocked SMTP based my router's MAC address. I configured my router to use a randomly generated MAC address, which in turn triggered my ISP to provide it with a fresh IP address. No more issues! Everything works.

Needless to say, I'm both frustrated and relieved.
 
Strange that didn't work when you tried cloning your MAC address in post #12. Just unlucky that they blacklisted your PC's MAC address as well I suppose.
 
Similar threads
Thread starter Title Forum Replies Date
W Merge 2 partition from telnet Asuswrt-Merlin 15

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top