Re: pg_hba.conf configuration

Поиск
Список
Период
Сортировка
От Nick Fankhauser
Тема Re: pg_hba.conf configuration
Дата
Msg-id NEBBLAAHGLEEPCGOBHDGIEIFEBAA.nickf@ontko.com
обсуждение исходный текст
Список 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 1.2.3.4, you would
add this line to pg_hba.conf:

host   all   1.2.3.4   255.255.255.255   trust

This line essentially says: let a *host* connect to *all* databases if the
host's ip address is *1.2.3.4* and *trust* any request from this machine
(don't do any further authorization checks.) The 255.255.255.255 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:
http://www.postgresql.org/idocs/index.php?client-authentication.html#PG-HBA.
CONF

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Antonio Fiol Bonnín
Дата:
Сообщение: Re: Servlet problems
Следующее
От: "Peter T. Brown"
Дата:
Сообщение: controlling process priority