Page 1 of 1

PostGres DB remote connection (not LAN)

PostPosted: Wed May 30, 2018 1:42 pm
by Marco Sgorbati
hi guys!
can I connect to my Postgres Resolve server via public IP to share "home studio" and "Company studio" projects?
locally all the workstations work fine.
setting up a VPN the DB works fine too.
changing the IP to public one when attempting to connect an error occurs.
any suggestion?

Re: PostGres DB remote connection (not LAN)

PostPosted: Wed May 30, 2018 1:59 pm
by roger.magnusson
If you're connected through a VPN you should use the local IP for the database, not the public one.

It should work, but I find the latency a bit high even of a fast connection.

Re: PostGres DB remote connection (not LAN)

PostPosted: Wed May 30, 2018 2:02 pm
by Marco Sgorbati
hi Roger, yes through the VPN the DB works fine.
I'd like to connect without VPN over the public IP.
the router ports are correctly forwarded to server.
may be I've to change something in postgres conf?

Re: PostGres DB remote connection (not LAN)

PostPosted: Wed May 30, 2018 4:00 pm
by roger.magnusson
Maybe a local firewall setting on the DB server?

Re: PostGres DB remote connection (not LAN)

PostPosted: Wed May 30, 2018 7:37 pm
by Igor Riđanović
What's the OS running the PostgreSQL server? If you're on Windows you also have to setup an internal firewall rule to allow TCP traffic on port 5432.

Re: PostGres DB remote connection (not LAN)

PostPosted: Thu May 31, 2018 1:37 pm
by Marco Sgorbati
thx Igor, the server runs osx and 5432 port is correctly forwarded to local server ip. firewalls are off.

Re: PostGres DB remote connection (not LAN)

PostPosted: Fri Jun 01, 2018 7:26 am
by Igor Riđanović
It sounds like you have everything setup correctly. I'd try using psql on the client. it will give you more insight as to where the failure may be. The basic syntax to connect is
Code: Select all
psql -h <IPaddress> -U postgres

It should prompt for a password.

If you connect you can try the
Code: Select all
 \l+
command. it will list the databases. At that point you should see your Resolve database(s).

If it fails somewhere along the way, hopefully there will be some useful information to tell you what's going on.

Alternately you can probe the port with nmap:
Code: Select all
nmap -sS -p5432 <IPaddress>

it will echo "5432/tcp open postgresql" if the port is open and the DB server is listening on it.