Re: running postgresql on a private machine accessing it from public web pages

From: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
To: "Keith D(dot) Evans" <evans(at)umbc(dot)edu>
Cc: jd(at)commandprompt(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: running postgresql on a private machine accessing it from public web pages
Date: 2009-05-21 18:52:20
Message-ID: d3ab2ec80905211152o4506f73t577abc451bc30ff8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In your application, the connection string should have the ip address of the
postgres server. The postgres server (solaris box) should allow port 5432
through the firewall.
If you cannot access port 5432 on your solaris box from the linux box,
then make sure that you don't have a firewall in the way.

You'll also want to make sure that in postgresql.conf, you have set

listen_addresses='*'

or

listen_addresses='<the.ip.of.the.solaris.box.'

Good luck

--Scott
--
Scott Mead
Sr. Systems Engineer
EnterpriseDB

scott(dot)mead(at)enterprisedb(dot)com
C: 607 765 1395
www.enterprisedb.com

On Thu, May 21, 2009 at 1:49 PM, Keith D. Evans <evans(at)umbc(dot)edu> wrote:

> Joshua,
>
> Let me rephrase what I wrote. The database is on a public machine (Linux),
> but the postgresql postmaster runs on a private machine (Solaris 10). Can
> we access the postgresql database through the public machine, even though
> the postmaster is running from a (different) private machine?
>
> thanx
> keith
>
> Joshua D. Drake wrote:
>
>> So, the question is, can someone go through these (public) web pages and
>>> access the postgresql database if the postgresql server is running on the
>>> private machine?
>>>
>>> We have other data in the postgresql and would like to only have to use
>>> one database types, i.e., postgresql.
>>>
>>>
>>
>> If you are using proper host control then yes you can make it so that
>> the PHP user is only able to access the public data in the private
>> database. See here:
>>
>> http://www.postgresql.org/docs/8.3/static/client-authentication.html
>> http://www.postgresql.org/docs/8.3/static/user-manag.html
>>
>> Sincerely,
>>
>> Joshua D. Drake
>>
>>
>>
>
> --
> "Nonviolence is not a cover for cowardice, but it is the supreme virtue of
> the brave." Mohandas Karamchand Gandhi
> =======================================================
> Keith D. Evans
> Joint Center for Earth Systems Technology/UMBC
> (301) 614-6282 (M,Tu)
> (410) 455-5751 (W,Th,F)
> http://www.jcet.umbc.edu/bios/evanmain.html
> ========================================================
>
> Any opinions expressed in this email are not those of NASA, or the Goddard
> Space Flight Center, or the Joint Center for Earth Systems Technology or the
> University of Maryland Baltimore County.
> ========================================================
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-05-21 19:04:33 Re: running postgresql on a private machine accessing it from public web pages
Previous Message Reid Thompson 2009-05-21 18:36:27 Re: running postgresql on a private machine accessing it from public web pages