I have a VirtualBox VM running locally that has postgresql 9.6 installed on Windows 10. I am able to connect to the instance with pgadmin on the virtual machine. I am trying to connect to that same instance from the host machine.
I have created an inbound firewall rule:
My pg_hba.conf file contains the following:
host all all 192.168.56.1/24 md5
And my postgresql.conf file contains the following:
listen_addresses = '*'
I have restarted the service (and also Windows) after making those changes. From my host machine I get the following error when attempting to connect:
I have switched to Bridged Networking instead of the default NAT. I have also tried to disable the Windows Firewall completely on the VM and that did not help.
Any ideas on which settings I am missing?
192.168.x.1
address is typically the router in my experience. That also looks like a host-only network address to me. A bridged connection should get an IP on the same subnet as your host from your DHCP server.