title: pgAdmin3 connection problems
body: <p>I'm recently setting up and running a Windows 2008 r2 server with VMware Workstation 8.</p>
  
  <p>I'm running a Centos 6.2 virtual linux box with Postgresql 9.1. Everything seems ok locally and I can connect to the CentOS box via a bridged network connection.</p>
  
  <p>I have followed <a href="http://www.davidghedini.com/pg/entry/install_postgresql_9_on_centos" rel="noreferrer">David Ghedini's</a> walkthrough for setting up Postgresql 9.1. So I am able to start a putty session window, log in as root and start psql shell and issue statements as postgres user. My problem is that I cannot connect using pgAdmin III from my Windows 7 client. I have updated the <code>/var/lib/pgsql/9.1/data/postgresql.conf</code> to enable listen_addresses '*', etc.</p>
  
  <p>Could anyone give me any tips on finding my fault. Have ensured Windows Firewall is disabled on the Windows server, too.</p>
  
  <p>The pgAdmin III client reports;</p>
  
  <blockquote>
    <p>'Server doesn't listen'</p>
  </blockquote>
  
  <p>The server doesn't accept connections: the connection library reports </p>
  
  <blockquote>
    <p>could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "192.168.1.26" and accepting TCP/IP connections on port 5432?</p>
  </blockquote>
  
  <p>This is the <code>pg_hba.conf</code> file entry added:</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>#TYPE DATABASE   USER   ADDRESS          METHOD
  host  all        all    192.168.1.0/24   trust
  </code></pre>
  
  <p>And the iptables file entries added:</p>
  
  <pre class="lang-none prettyprint-override"><code>-A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 192.168.1.26 --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT
  -A OUTPUT -p tcp -s 192.168.1.26 --sport 5432 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
  </code></pre>