pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Catalin Pitis <cpitis.pgsql@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Connecting to Postgres from other machines (outside localhost)
Date: Thu, 4 May 2006 22:00:00 +0300
Message-ID: <63c4c13c0605041200i36b6ad0bw21e6b9ab967df47a@mail.gmail.com> (raw)
In-Reply-To: <63c4c13c0605041134k75a5e51bg88d1b4f5a230e58e@mail.gmail.com>
References: <63c4c13c0605041052q4212965bua0a3a376ba8abf3f@mail.gmail.com>
	<445A4159.2060707@oisinglynn.com>
	<63c4c13c0605041134k75a5e51bg88d1b4f5a230e58e@mail.gmail.com>

After I've changed the pg_hba.conf, I got the following error when
connecting (from log file)

2006-05-04 21:57:26 LOG:  invalid entry in file "C:/Program
Files/PostgreSQL/8.0/data/pg_hba.conf" at line 68, token "192.168.0.1/192"
2006-05-04 21:57:26 FATAL:  missing or erroneous pg_hba.conf file
2006-05-04 21:57:26 HINT:  See server log for details.

The pg_hba.conf file is attached...

Catalin


On 5/4/06, Catalin Pitis <cpitis.pgsql@gmail.com> 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 = '*' # 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@oisinglynn.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          md5
> > host    all         all         192.168.10.1/24          md5
> > # IPv6 local connections:
> > #host    all         all         ::1/128               md5
> >
> >
>

Attachments:

  pg_hba.conf (application/octet-stream, 3.0K) download

view thread (4+ messages)  latest in thread

Message-ID: <63c4c13c0605041200i36b6ad0bw21e6b9ab967df47a@mail.gmail.com>
Permalink:  ../63c4c13c0605041200i36b6ad0bw21e6b9ab967df47a@mail.gmail.com/
Also on:    postgresql.org/message-id/63c4c13c0605041200i36b6ad0bw21e6b9ab967df47a@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cpitis.pgsql@gmail.com
  Subject: Re: Connecting to Postgres from other machines (outside localhost)
  In-Reply-To: <63c4c13c0605041200i36b6ad0bw21e6b9ab967df47a@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox