From: Robby Russell <rrussell@commandprompt.com>
To: Cath Lawrence <Cath.Lawrence@anu.edu.au>
Cc: pgsql-novice@postgresql.org
Cc: pgsql-php@postgresql.org
Subject: Re: [PHP] authentication question
Date: Wed, 06 Aug 2003 23:12:32 -0400
Message-ID: <3F31C3A0.5010506@commandprompt.com> (raw)
In-Reply-To: <A19895BC-C89A-11D7-9EC1-00039390F614@anu.edu.au>
References: <A19895BC-C89A-11D7-9EC1-00039390F614@anu.edu.au>
Cath Lawrence wrote:
> Hi,
>
> Not sure if this is a novice or a PHP question; so I sent it to both.
>
> Anyway, I can't seem to deny access to my database through the web
> server/PHP connection...
>
> In my pg_hba.conf, at the top, before getting to the real databases,
> I have:
> # temporary, cath testing access on example
> local temp all reject
> host temp all 127.0.0.1 255.255.255.255 reject
> host temp all 0.0.0.0 255.255.255.255 reject
>
> Command line psql won't let me connect to temp - so far so good.
> But when I use PHP's pg_connect with host, dbname, username, password
> specified, it lets me through. It does fail non-users or bad passwords
> - but all existing postgresql users seem to be able to make the
> connection regardless.
>
> What have I missed? Ultimately, I am trying to set this up so only
> specific known users can connect to my database from particular hosts.
Cath,
I'm not sure if this will help you or not, but try adding this to the
bottom (seen this as a common practice)
# reject all connections from all hosts not granted above
host all 0.0.0.0 0.0.0.0 reject
-Robby
--
Robby Russell, Sr. Administrator / Lead Programmer
Command Prompt, Inc.
rrussell@commandprompt.com
http://www.commandprompt.com (503) 222.2783
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: rrussell@commandprompt.com, Cath.Lawrence@anu.edu.au, pgsql-novice@postgresql.org
Subject: Re: [PHP] authentication question
In-Reply-To: <3F31C3A0.5010506@commandprompt.com>
References: <A19895BC-C89A-11D7-9EC1-00039390F614@anu.edu.au> <3F31C3A0.5010506@commandprompt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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