Re: Connecting to Postgres from other machines (outside localhost)

From: "Catalin Pitis" <cpitis(dot)pgsql(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Connecting to Postgres from other machines (outside localhost)
Date: 2006-05-04 19:30:18
Message-ID: 63c4c13c0605041230n35d1eac7v1df761cd8f27d489@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 <me(at)oisinglynn(dot)com> 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
> > <http://127.0.0.1/32> md5
> > host all all 192.168.197.1/192
> > <http://192.168.197.1/192> md5
> > host all all 192.168.123.1/192
> > <http://192.168.123.1/192> md5
> > host all all 192.168.0.1/192
> > <http://192.168.0.1/192> md5
> >
> >
> > I set postgres.conf:
> >
> > listen_addresses = '*' # what IP interface(s) to listen on;
> > # defaults to localhost, '*' = any
> > port = 5433
> > max_connections = 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* <me(at)oisinglynn(dot)com
> > <mailto:me(at)oisinglynn(dot)com>> 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 = '*' # what IP address(es) to listen on;
> > # comma-separated list of addresses;
> > # defaults to 'localhost', '*' = all
> > port = 5432
> > max_connections = 100
> >
> > pg_hba.conf
> > # TYPE DATABASE USER CIDR-ADDRESS METHOD
> >
> > # IPv4 local connections:
> > host all all 127.0.0.1/32
> > <http://127.0.0.1/32> md5
> > host all all 192.168.10.1/24
> > <http://192.168.10.1/24> md5
> > # IPv6 local connections:
> > #host all all ::1/128 md5
> >
> >
> Did you stop and start Postgres Service?
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Markus Schaber 2006-05-05 08:17:38 Re: How can I read display message from a C function
Previous Message Catalin Pitis 2006-05-04 19:00:00 Re: Connecting to Postgres from other machines (outside localhost)