I am trying to connect to my database on a remote server using QGIS. From what I've read I have to edit the pg_hba.conf
and the postgresql.conf
files. I think I have edited these files to allow any IP to connect using the password (not very secure but I'll sort that out when I get this issue figured out). I have verified that my parameters in the PostGIS connection tool are correct.
When I try to connect to the database it says theres an error. I'm not sure if I missed a step or if I did anything incorrect, can anyone give me some suggestions on how to get this accomplished?
# IPv4 local connections:
host all all 0.0.0.0/0 md5
# IPv6 local connections:
host all all ::0/0 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
host replication all 0.0.0.0/0 md5
host replication all ::0/0 md5
Versions: QGIS 3.4.14, PostgreSQL 10, pgAdmin 4
OS: Client side -> Windows 10, Server side -> Windows Server 2012
listen_addresses = '*' # what IP address(es) to listen on;
in postgresql.conf and to restart the server (note: I strongly discourage against * and 0.0.0.0/0 as it means your DB is an open bar for everybody)/32
(or/24
if your local IP do change a bit). Also if exposed to the web, don't allowall
users but only specific one(s)