title: Unable to connect to server PostgreSQL database with pgAdmin
body: <p>I have a brand new <code>Debian 10</code> and <code>PostgreSQL</code> installation on a remote server and I want to connect with <code>pgAdmin</code> to this database from my PC. When I create a server on <code>pgAdmin</code> I have (I hide my host) :</p>
  <blockquote>
  <p>Unable to connect to server:<br />
  could not connect to server: Connection timed out (0x0000274C/10060)<br />
  Is the server running on host &quot;....&quot; and accepting TCP/IP connections on port 5432?</p>
  </blockquote>
  <p>In the server installations seems ok, <code>PostgreSQL</code> status is active. When I run</p>
  <pre><code>netstat -nlp | grep 5432
  </code></pre>
  <p>I get</p>
  <pre><code>tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      4014/postgres
  tcp6       0      0 :::5432                 :::*                    LISTEN      4014/postgres
  unix  2      [ ACC ]     STREAM     LISTENING     48416    4014/postgres        /var/run/postgresql/.s.PGSQL.5432
  </code></pre>
  <p>And my PostgreSQL configuration is :</p>
  <pre><code>pg_hba.conf
  
  
  #IPv4 local connections:
  host    all             all             127.0.0.1/32            md5
  host    all             all             all                     md5
  
  #IPv6 local connections:
  host    all             all             ::1/128                 md5
  host    all             all             all                     md5
  
  
  postgresql.conf
  
  listen_addresses = '*'
  </code></pre>
  <p>I restart postgresql service after with <code>sudo service postgresql restart</code>. In this example I add all hosts, I know it's not a secure way, but it's still a test, I will filter by Ip addresses after.</p>
  <p>How to connect to a remote database in a local machine ?</p>
  <p>Is there any additional configuration with <code>nftables</code> firewall to set up ?</p>