title: Can't connect to postgreSQL in VM (Ubuntu): Access to database denied
body: <p>I use a Windows 10 machine with Virtualbox 5.0.16 in which Ubuntu 15.10 is running. The network adapter is a Bridged one with the name set to Intel(R) Dual Band Wireless-AS 3165. The promiscuous-Mode is set to allow all VMs and the host and the underlying checkbox is checked (cable connected).</p>
  
  <p>In this Ubuntu, I run a PostgreSQL 9.4.5 instance in which I configured both the postgresql.conf and pg_hba.conf files.</p>
  
  <p>In the postgresql.conf file, I have well set this line:</p>
  
  <pre><code>listen_addresses = '*'
  </code></pre>
  
  <p>And in the pg_hba.conf, I have following lines at the bottom:</p>
  
  <pre><code># TYPE  DATABASE        USER            ADDRESS                 METHOD
  # IPv4 local connections:
  host    all             all             127.0.0.1/32            md5
  host all all 0.0.0.0/0 md5
  host    all             all             ::1/128                 md5
  host    all     all        ::/0                 md5
  host    all     all        192.168.1.13                 md5
  host    all     all        0.0.0.0/0                 md5
  </code></pre>
  
  <p>Currently, the ip address of my host machine is (ipconfig command and wireless) 192.168.1.13 and the guest machine is (ifconfig command) 192.168.1.4</p>
  
  <p>When using pgadmin from the host machine to connect to the guest machine, I get following message: FATAL: no pg_hba.conf entry for host "192.168.1.13", user "postgres", database "postgres", SSL off </p>
  
  <p>I tried to connect to my host to guest via ssh but I get a "Network error: Connection refused" message. Maybe this is a key insight of my issue?</p>
  
  <p>The ping works in both directions.</p>