Thread: Bind PostgreSQL to a specific IP

Bind PostgreSQL to a specific IP

From
Mário Gamito
Date:
Hi,

I've compiled PostgreSQL.
Whenever i start it, it is binded to localhost (netstat -an shows port
5342 binded to 127.0.0.1), but i need it to allow incoming connections
from netowrk 10.10.2.0

How can i do it ?

Any help would be apreciated.

Warm Regards.
--
Mário Gamito
Administração de sistemas e desenvolvimento
Netual - Multimédia e Telecomunicações, Lda.
Rua João Afonso, Nº1
3800-198 Aveiro - Portugal
Tel. +351 234 371 431 / Fax. +351 234 371 438
E-mail: gamito@netual.pt
www.netual.pt

Re: Bind PostgreSQL to a specific IP

From
"Benjamin GASSMANN"
Date:
Hi,

have a look at file ph_hba.conf !

Le Tue, 14 Dec 2004 15:47:05 +0000, Mário Gamito <gamito@netual.pt> a
écrit:

> Hi,
>
> I've compiled PostgreSQL.
> Whenever i start it, it is binded to localhost (netstat -an shows port
> 5342 binded to 127.0.0.1), but i need it to allow incoming connections
> from netowrk 10.10.2.0
>
> How can i do it ?
>
> Any help would be apreciated.
>
> Warm Regards.



--
Benjamin GASSMANN
ACTIMAGE
http://www.actimage.net

GSM : 06.80.12.07.66

Re: Bind PostgreSQL to a specific IP

From
Michael Fuhr
Date:
On Tue, Dec 14, 2004 at 04:57:31PM +0100, Benjamin GASSMANN wrote:
> Le Tue, 14 Dec 2004 15:47:05 +0000, Mário Gamito <gamito@netual.pt> a écrit:
> >
> >I've compiled PostgreSQL.
> >Whenever i start it, it is binded to localhost (netstat -an shows port
> >5342 binded to 127.0.0.1), but i need it to allow incoming connections
> >from netowrk 10.10.2.0
>
> have a look at file ph_hba.conf !

Configuring pg_hba.conf won't help if the server isn't accepting
connections on the desired interface.  You probably need to make
some changes to postgresql.conf; see the "Connections and Authentication"
section in the "Server Run-time Environment" chapter of the
documentation.  Some of the connection settings have changed names
in 8.0, so make sure you're reading the right version of the doc.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: Bind PostgreSQL to a specific IP

From
Tom Lane
Date:
=?ISO-8859-1?Q?M=E1rio_Gamito?= <gamito@netual.pt> writes:
> Whenever i start it, it is binded to localhost (netstat -an shows port
> 5342 binded to 127.0.0.1), but i need it to allow incoming connections
> from netowrk 10.10.2.0

Perhaps you forgot the -i switch?

The literal answer to your Subject: question is to use the virtual_host
parameter (or listen_addresses, if you're testing 8.0), but I suspect
that's not actually what you need to do.

            regards, tom lane