As configurações do firewall estão corretas, mas a porta ainda está fechada externamente

As configurações do firewall estão corretas, mas a porta ainda está fechada externamente

Estou configurando o machien para conectar-se ao postgresql remotamente, verifico algo e parece que tudo está correto

Verificando o status da porta:

$> sudo netstat -tulpn | grep LISTEN | grep 5432

tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 18134/postgres

Verificando o firewall

$> sudo ufw status | grep 5432

5432 ALLOW Anywhere

Ping dentro do trabalho da máquina:

$> telnet 185.235.x.x 5432

Connected to 185.235.x.x

Mas quando ligar de fora da máquina

 $> telnet 185.235.x.x 5432
  
 Connecting ... (And then timeout)

O que devo fazer mais?

Atualizar

o pg_hba.cof :

# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            md5
host    replication     all             ::1/128                 md5
host    all             all             0.0.0.0/0               md5

informação relacionada