pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
HowTo SSL probaply with ODBC ? 3+ messages / 3 participants [nested] [flat]
* HowTo SSL probaply with ODBC ? @ 2007-05-16 14:23 Andreas <maps.on@gmx.net> 0 siblings, 2 replies; 3+ messages in thread From: Andreas @ 2007-05-16 14:23 UTC (permalink / raw) To: pgsql-odbc; pgsql-general@postgresql.org Hi, is there a documentation on how to secure a connection withe SSL? That is an option of the ODBC driver, isn't it? The motivation is that I need to rent a remote server for PG. Their admin proposes to open port 5432 on the outside of their firewall but he has no idea how to secure the access besides PG's user/password. I couldn't even restrict the accessing IPs within PG because they will be dynamic. Regards Andreas ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: HowTo SSL probaply with ODBC ? @ 2007-05-16 23:56 John DeSoi <desoi@pgedit.com> parent: Andreas <maps.on@gmx.net> 1 sibling, 0 replies; 3+ messages in thread From: John DeSoi @ 2007-05-16 23:56 UTC (permalink / raw) To: Andreas <maps.on@gmx.net>; +Cc: pgsql-odbc; pgsql-general@postgresql.org On May 16, 2007, at 10:23 AM, Andreas wrote: > is there a documentation on how to secure a connection withe SSL? > That is an option of the ODBC driver, isn't it? http://www.postgresql.org/docs/8.2/interactive/ssl-tcp.html I don't know about ODBC. > > The motivation is that I need to rent a remote server for PG. > Their admin proposes to open port 5432 on the outside of their > firewall but he has no idea how to secure the access besides PG's > user/password. > I couldn't even restrict the accessing IPs within PG because they > will be dynamic. If they won't setup PostgreSQL properly with SSL support, your best bet is to setup a SSH tunnel. This will also work with ODBC. If they don't support SSH, find another provider :). Here is some background on setting it up: http://pgedit.com/tip/postgresql/ssh_tunneling John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: HowTo SSL probaply with ODBC ? @ 2007-05-18 07:26 Albe Laurenz <all@adv.magwien.gv.at> parent: Andreas <maps.on@gmx.net> 1 sibling, 0 replies; 3+ messages in thread From: Albe Laurenz @ 2007-05-18 07:26 UTC (permalink / raw) To: Andreas *EXTERN* <maps.on@gmx.net>; pgsql-odbc; pgsql-general@postgresql.org Andreas wrote: > is there a documentation on how to secure a connection withe SSL? > That is an option of the ODBC driver, isn't it? > > The motivation is that I need to rent a remote server for PG. > Their admin proposes to open port 5432 on the outside of their firewall > but he has no idea how to secure the access besides PG's user/password. > I couldn't even restrict the accessing IPs within PG because they will > be dynamic. The ODBC driver uses libpq.dll to establish the connection, and libpq.dll can use SSL encryption, so you should have no problem. You must enable SSL on the server (your provider, that is), by setting 'ssl = on' in postgresql.conf. There must be a server.key and server.crt file in the PostgreSQL server data directory containing the private key and the public certificate of the server. Moreover, this only makes sense if you enforce it. In pg_hba.conf on the server, add two lines like this: hostssl all all 0.0.0.0/0 md5 host all all 0.0.0.0/0 reject Then only SSL connections will be accepted. This way you can also restrict connections to be only allowed from your subnet - just change the IP address and netmask in the 'hostssl' line to match your subnet. Yours, Laurenz Albe ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2007-05-18 07:26 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2007-05-16 14:23 HowTo SSL probaply with ODBC ? Andreas <maps.on@gmx.net> 2007-05-16 23:56 ` John DeSoi <desoi@pgedit.com> 2007-05-18 07:26 ` Albe Laurenz <all@adv.magwien.gv.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox