Re: Problem with connection to host (wrong host)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Problem with connection to host (wrong host)
Дата
Msg-id 3606a8bb-897c-e0ab-ca63-2b495c5cba6b@2ndquadrant.com
обсуждение исходный текст
Ответ на Problem with connection to host (wrong host)  (Mike Martin <redtux1@gmail.com>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Mike Martin
Дата:
Сообщение: Problem with connection to host (wrong host)
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: Problem with connection to host (wrong host)