title: Setting up Postgres: Can't connect remotely to Postgres server (debian)
body: <p>I am having problem with connect with database from outside server. I read a lot of topics about of this subject. And nothing...</p>
  
  <p>Postgresql 8.4 / Debian</p>
  
  <p>My /etc/postgresql/8.4/main/<strong>postgresql.conf</strong>:</p>
  
  <pre><code>listen_addresses = '*'
  port = 5432
  max_connections = 100
  </code></pre>
  
  <p>My /etc/postgresql/8.4/main/<strong>pg_hba.conf</strong>:</p>
  
  <pre><code>local all all trust
  host all all 127.0.0.1/32 trust
  host all all ::1/128 trust
  host all all 0.0.0.0/0 trust
  </code></pre>
  
  <p><strong>netstat -nlp | grep 5432</strong></p>
  
  <pre><code>tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN    6520/postgres
  tcp6       0      0 :::5432                 :::*                    LISTEN    6520/postgres
  unix  2      [ ACC ]     STREAM     LISTENING     15338180 6520/postgres       /var/run/postgresql/.s.PGSQL.5432
  </code></pre>
  
  <p><strong>telnet localhost 5432</strong>                                                    </p>
  
  <pre><code>Trying 127.0.0.1...
  Connected to localhost.localdomain.
  </code></pre>
  
  <p>But when I try connect from my computer I always get "Failed to establish a connection to".</p>
  
  <p>Any idea what I am doing wrong ? :/ Thanks for yours help :)</p>