From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Mike Martin <redtux1@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Problem with connection to host (wrong host)
Date: Sat, 31 Mar 2018 11:59:12 -0400
Message-ID: <3606a8bb-897c-e0ab-ca63-2b495c5cba6b@2ndquadrant.com> (raw)
In-Reply-To: <CAOwYNKZ7LB0SV-U7avdJ2T6rRpTv5KZJ4VSJccgcF+r4VxWg8A@mail.gmail.com>
References: <CAOwYNKZ7LB0SV-U7avdJ2T6rRpTv5KZJ4VSJccgcF+r4VxWg8A@mail.gmail.com>
On 3/31/18 11:44, Mike Martin wrote:
> Hi
> I am just setting up a postgres server, details
> Host 192.168.0.3
> pg_hba.conf
> # TYPE DATABASE USER ADDRESS METHOD
>
> # "local" is for Unix domain socket connections only
> local all all peer
> # IPv4 local connections:
> host all all 192.168.0.0/32
> <http://192.168.0.0/32> ident
This entry should probably be something like
192.168.0.0/24
Writing .0/32 doesn't make much sense.
> # IPv6 local connections:
> host all all 127.0.0.1/32
> <http://127.0.0.1/32> ident
>
> host all all ::1/128 ident
>
> postgresql.conf
> listen_addresses-'*'
>
> however when I try to connect from my laptop (ip 192.168.0.2) I get
>
> psql -h 192.168.0.3 -U usevideo -W
> Password for user usevideo:
> psql: FATAL: no pg_hba.conf entry for host "192.168.0.2", user
> "usevideo", database "usevideo", SSL off
>
> So a bit confused, is psql ignoring the host parameter
.3 is the host you are connecting to, as seen from the client.
.2 is the host your connection is coming from, as seen from the server.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, redtux1@gmail.com
Subject: Re: Problem with connection to host (wrong host)
In-Reply-To: <3606a8bb-897c-e0ab-ca63-2b495c5cba6b@2ndquadrant.com>
References: <CAOwYNKZ7LB0SV-U7avdJ2T6rRpTv5KZJ4VSJccgcF+r4VxWg8A@mail.gmail.com> <3606a8bb-897c-e0ab-ca63-2b495c5cba6b@2ndquadrant.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