X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 566749FA9BD for ; Thu, 4 May 2006 16:30:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 14647-01 for ; Thu, 4 May 2006 16:30:20 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by postgresql.org (Postfix) with ESMTP id 682F39FA65C for ; Thu, 4 May 2006 16:30:20 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id i21so413222wra for ; Thu, 04 May 2006 12:30:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Tr6BqqrHlG7xiIL5gYQzjmHE19/KVkwyJDUhjG/teYxgcmO31ThA8wMQOkSSTK2SjNT2RIneAr5Iq3liqwfgdCkPe7TmMrTTIEFpCyAI5QobX4FlkYmQfXPEzuIte38KPW7X7PLfNJoG1G3OSI4IB7O1JTGesIE8w4qEpmLBmBI= Received: by 10.54.156.11 with SMTP id d11mr1299403wre; Thu, 04 May 2006 12:30:18 -0700 (PDT) Received: by 10.54.135.14 with HTTP; Thu, 4 May 2006 12:30:18 -0700 (PDT) Message-ID: <63c4c13c0605041230n35d1eac7v1df761cd8f27d489@mail.gmail.com> Date: Thu, 4 May 2006 22:30:18 +0300 From: "Catalin Pitis" To: pgsql-sql@postgresql.org Subject: Re: Connecting to Postgres from other machines (outside localhost) In-Reply-To: <445A5035.7000908@oisinglynn.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10508_13752908.1146771018527" References: <63c4c13c0605041052q4212965bua0a3a376ba8abf3f@mail.gmail.com> <445A4159.2060707@oisinglynn.com> <63c4c13c0605041134k75a5e51bg88d1b4f5a230e58e@mail.gmail.com> <445A5035.7000908@oisinglynn.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/56 X-Sequence-Number: 25087 ------=_Part_10508_13752908.1146771018527 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ok, I found it, it was my mistake. An IP entry should be have /32 or /128. I used different values. Now I got it (RTFM). Regards, Catalin On 5/4/06, Oisin Glynn wrote: > > Catalin Pitis wrote: > > I did all you said: > > > > I set pg_hba.conf: > > > > # IPv4 local connections: > > host all all 127.0.0.1/32 > > md5 > > host all all 192.168.197.1/192 > > md5 > > host all all 192.168.123.1/192 > > md5 > > host all all 192.168.0.1/192 > > md5 > > > > > > I set postgres.conf: > > > > listen_addresses =3D '*' # what IP interface(s) to listen on; > > # defaults to localhost, '*' =3D any > > port =3D 5433 > > max_connections =3D 100 > > > > I'm using jdbc with the following URL: > > > > jdbc:postgresql://192.168.197.1:5433/postgres8 > > > > Where postgres8 is the name of the database. > > > > I still can't connect... > > > > Can you give me a hint? > > > > Thanks > > Catalin > > > > > > On 5/4/06, *Oisin Glynn* > > wrote: > > > > Catalin Pitis wrote: > > > Hello > > > > > > I installed PostgreSQL 8.0 on Windows and I can connect from > > localhost > > > only. How can I configure the server to allow connection from > other > > > machines? > > > > > > Thank you > > > Catalin > > Under > > Start-> Programs->PostgreSQLXX->Configuration files > > postgresql.conf > > pg_hba.conf > > > > Are the 2 files I modified. Please be aware my settings are for a > dev > > box and are WIDE OPEN AS SHOWN HERE this might allow alot more > people > > connect than you want. > > > > postgresql.conf > > # - Connection Settings - > > > > listen_addresses =3D '*' # what IP address(es) to listen on; > > # comma-separated list of addresses; > > # defaults to 'localhost', '*' =3D all > > port =3D 5432 > > max_connections =3D 100 > > > > pg_hba.conf > > # TYPE DATABASE USER CIDR-ADDRESS METHOD > > > > # IPv4 local connections: > > host all all 127.0.0.1/32 > > md5 > > host all all 192.168.10.1/24 > > md5 > > # IPv6 local connections: > > #host all all ::1/128 md5 > > > > > Did you stop and start Postgres Service? > > ------=_Part_10508_13752908.1146771018527 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Ok, I found it, it was my mistake.
 
An IP entry should be have /32 or /128. I used different values. Now I= got it (RTFM).
 
Regards,
Catalin

 
On 5/4/06, O= isin Glynn <me@oisinglynn.com> wrote:
Catalin Pitis wrote:
> I d= id all you said:
>
> I set pg_hba.conf:
>
> # IPv4 = local connections:
> host    all      = ;   all        
127.0.0.1/32
> <http://127.0.0.1/32>      &= nbsp;   md5
> host    all &nb= sp;       all     &n= bsp;   192.168.197.1/192
> <http= ://192.168.197.1/192>        = ;  md5
> host    all   &= nbsp;     all       =   192.168.123.1/192
> &= lt; http://192.168.123.1/192> =          md5
> host = ;   all         all&= nbsp;        192.168.0.1/192
> <= http://192.168.0.1/192 >          md5
= >
>
> I set postgres.conf:
>
> listen_addresses = =3D '*' # what IP interface(s) to listen on;
>    = ; # defaults to localhost, '*' =3D any
> port =3D 5433
> max_co= nnections =3D 100
>
> I'm using jdbc with the following URL:
>
> jdb= c:postgresql://192.168.197.1:5433/postgres8
>
> Where postgres8= is the name of the database.
>
> I still can't connect...
>
> Can you give me a hint?
>
> Thanks
> Catalin=
>
>
> On 5/4/06, *Oisin Glynn* <me@oisinglynn.com
> <mailto: me@oisinglynn.com>> wrote:
>
>    = ; Catalin Pitis wrote:
>     > Hello
>&n= bsp;    >
>     > I installe= d PostgreSQL 8.0 on Windows and I can connect from
>   = ;  localhost
>     > only. How can I configure the server to a= llow connection from other
>     > machines?>     >
>     > Th= ank you
>     > Catalin
>  &nb= sp;  Under
>     Start-> Programs->Pos= tgreSQLXX->Configuration files
>     postgresql.conf
>   &= nbsp; pg_hba.conf
>
>     Are the 2 files I= modified.  Please be aware my settings are for a dev
>&nbs= p;    box and are WIDE OPEN AS SHOWN HERE this might allow a= lot more people
>     connect than you want.
>
>&nbs= p;    postgresql.conf
>     # - Co= nnection Settings -
>
>     listen_addresse= s =3D '*'        # what IP address(= es) to listen on;
>        &n= bsp;            = ;   # comma-separated list of addresses;
>           &= nbsp;           &nbs= p;# defaults to 'localhost', '*' =3D all
>     po= rt =3D 5432
>     max_connections =3D 100
>=
>     pg_hba.conf
>    = ; # TYPE  DATABASE    USER   &= nbsp;    CIDR-ADDRESS     &nbs= p;    METHOD
>
>     # IPv4 local connections:
>&= nbsp;    host    all   &n= bsp;     all       &= nbsp; 127.0.0.1/32
>  &= nbsp;  <http://127.0.0.1/32>=           md5
>     host    all  = ;       all     &nbs= p;   192.168.10.1/24
&g= t;     <http://19= 2.168.10.1/24>         =  md5
>     # IPv6 local connections:
>     #host    all &nbs= p;       all     &nb= sp;   ::1/128        &nbs= p;      md5
>
>
Did you stop and st= art Postgres Service?


------=_Part_10508_13752908.1146771018527--