Glam Prestige Journal

Bright entertainment trends with youth appeal.

I have an Ubuntu 14.04 (Trusty Tahr) is mounted on AWS and i cannot connect to the SMTP GMail service vía:

SSL(465):

## $ telnet smtp.gmail.com 465 ##
Trying 74.125.28.109...
Trying 74.125.28.108...
Trying 2607:f8b0:400e:c04::6c...
telnet: Unable to connect to remote host: Network is unreachable

TLS(587):

## $ telnet smtp.gmail.com 587 ##
Trying 74.125.28.108...
Trying 74.125.28.109...
Trying 2607:f8b0:400e:c04::6c...
telnet: Unable to connect to remote host: Network is unreachable

My open ports are:

## $ sudo netstat -tlnp ##
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:3306 0.0.0.0:* LISTEN 1069/mysqld
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 1050/redis-server 1
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 959/sshd
tcp6 0 0 :::80 :::* LISTEN 7716/apache2
tcp6 0 0 :::22 :::* LISTEN 959/sshd

The UFW Firewall are inactive

## $ sudo ufw status verbose ##
Status: inactive

I already saved the firewall rules with:

$ sudo iptables -A INPUT -p tcp --dport 587 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ sudo iptables -A OUTPUT -p tcp --sport 587 -m conntrack --ctstate ESTABLISHED -j ACCEPT
$ sudo iptables-save
3

2 Answers

I had similar problem, VPS machine without firewall and with same error as you listed. I contacted support of VPS provider and it turned out they had one more firewall that was wrapping my machine. So they enabled port 587 on that firewall and everything was working smoothly.

This may be a firewall problem. I faced a similar problem in Ubuntu (Digital Ocean server). I tried to fix the issue for 3 days. I equally tried using auth2, and finally checked the Digital Ocean admin panel and created a firewall for the droplet.

The problem was solved by enabling TCP inbound and outbound in the firewall settings.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy