Re: connect external app via pgadmin - Mailing list pgadmin-support

From richard coleman
Subject Re: connect external app via pgadmin
Date
Msg-id CAGA3vBt4TU0J7N2y-onougC+wCmF5MeLSmrsEOSbMh6797q+ug@mail.gmail.com
Whole thread Raw
In response to Re: connect external app via pgadmin  (bw <bwakkie@gmail.com>)
List pgadmin-support
B., 

I hate to be the bearer of bad news, but in a nutshell no.  As you write, with both pgAdmin and postgreSQL installed on the same machine there is no need to open any ports to access that particular postgreSQL instance.  Unfortunately unless the other application is also installed on that same server AND had the ability to connect to postgreSQL without opening a port, it won't be able to access postgreSQL either.

If you have postgreSQL and Qgis installed on the same server and Qgis is configured to use postgreSQL internally, then if you open up the ports needed to let the users use Qgis, you should be able to keep the postgreSQL port closed to the outside world.  That's a lot of ifs and ands though.

I hope that helps, 

rik.

On Wed, Aug 12, 2020 at 7:38 AM bw <bwakkie@gmail.com> wrote:
I think you are missing the point Andrzej, my pgadmin and postgresql do run on the same server and there is no need to open up port 5432 externally or even internally and block access to the external world via the firewall as pgadmin is connected via the local socket. And I like to keep it that way hence my question :)

...but ... I like to give members that do have a pgadmin account the possibility to use their account to be able to connect via an external program like qgis.

I like the maintenance to be as limited as possible so definitely not maintaining access via the pg_hda.conf or fiddling around with firewall regex rules for each user while they already have an pgadmin account.

cheers. B

On Wed, 12 Aug 2020 at 12:51, androxkentaki <androxkentaki@gmail.com> wrote:
But pgAdmin runs at the same ports, so You need them to be opened.

You can set in pgconf allowed IP pool.
You can change default port no por postgresql

Maybe You can consider "hardware" solution: on Your gateway make in firewall rule for specific IP address with port mapping/triggering
e.g. If Your pg is on default port 5432 make an rule that from if somebody from external will try to connect via 87654 port will be redirected to 5432


I don't know how Your infrastructure looks like so i can't give you more detailed solution

śr., 12 sie 2020 o 12:41 bw <bwakkie@gmail.com> napisał(a):
Andrzej,

QGIS is just an example as I use it in combination with postgis in order to work in mapping GIS elements.
With odbc I still need to open up the server ports to the outside world which is what I want to avoid.

regards,
Bastiaan

On Wed, 12 Aug 2020 at 11:43, androxkentaki <androxkentaki@gmail.com> wrote:
i don't know what id Qgis and why You want to do it via pgAdmin...

But did You consider using ODBC connection and its driver?

śr., 12 sie 2020 o 08:58 bw <bwakkie@gmail.com> napisał(a):
Hi,

As I do not like to open-up my postgresql port to the outside world and managing users via pgadmin is very user friendly. I was wondering if somehow it would be possible to give external applications like Qgis for instance access to the database via pgadmin?

For example in qgis in order to access the database it needs to connect directly to the postgresql port and I have to create a linux user for them. I do not want that. I rather manage this inside pgadmin. If qgis would somehow be able to connect to the db via a pgadmin api that would be really great.

regards,
Bastiaan


--
Z wyrazami szacunku
Andrzej Gerasimuk


--
Z wyrazami szacunku
Andrzej Gerasimuk

pgadmin-support by date:

Previous
From: bw
Date:
Subject: Re: connect external app via pgadmin
Next
From: Trung Do
Date:
Subject: Bug report: pgAdmin takes selected portion of query in Query Editor to run