Skip site navigation (1) Skip section navigation (2)

Re: pg_hba.conf configuration

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Paul Wallace" <paul(dot)wallace(at)prosolutions-ap(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Cc: <Dave(at)micro-automation(dot)net>
Subject: Re: pg_hba.conf configuration
Date: 2001-12-19 15:07:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
> Presumably to make a connection to a remote database, I need to start
> the postmaster with the -i switch,

True, but I'd recommend instead adding the line "tcpip_socket = 1" to
postgresql.conf if you are running v 7.1 or higher. This does the same thing
as -i, & keeps you from having to mess with startup scripts

> and configure the pg_hba.conf file? Can
> you tell me what needs to be edited in this file please? A single
> connection...

if your client (appserver host) machine's ip address is, you would
add this line to pg_hba.conf:

host   all   trust

This line essentially says: let a *host* connect to *all* databases if the
host's ip address is ** and *trust* any request from this machine
(don't do any further authorization checks.) The is just the
netmask, so for now, I'm setting it for one machine, but of course you could
make it accept any host on your subnet.

This is the simplest form. To tighten up security a bit, you'll want to
replace "trust" with another authorization method later, but I'm assuming
that for now, you'd just like to see it work. When the time comes to add
security, look here for the auth methods:


Nick Fankhauser  nickf(at)ontko(dot)com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services

In response to

pgsql-jdbc by date

Next:From: Peter T. BrownDate: 2001-12-20 02:58:37
Subject: controlling process priority
Previous:From: David BrownleeDate: 2001-12-19 12:14:39
Subject: Re: date problem with postgres JDBC 7.1 driver

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group