'Cannot connect to postgres over external ip

I am trying to connect to postgres database that is on a server and i am trying to connect an application to database

The port 5432 on the open port check tool is closed, but on server in listening enter image description here

here is my postgres.conf and pg_hba.conf enter image description here

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source