Home > Archive > PostgreSQL Discussion > May 2005 > Connecting to Postgres from LAN









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Connecting to Postgres from LAN
Andrus

2005-05-30, 1:23 pm

I installed Postgres 8 to Windows XP and added a line

host all all 168.179.0.1/32 trust

to pg_hba.conf file


When connection from LAN to the Postgres with user name postgres I got error

no pg_hba.conf entry for host "168.179.0.10", user "postgres", database
"mydb", SSL off


How to enable connection from LAN ?

Andrus


John Gray

2005-05-30, 8:23 pm

On Mon, 30 May 2005 21:47:43 +0300, Andrus wrote:

> I installed Postgres 8 to Windows XP and added a line
>
> host all all 168.179.0.1/32 trust
>


I think you should probably make that 168.179.0.0/24 - the /32 means that
only the IP address 168.179.0.1 is covered by that line, so the pattern
does not match.

Regards

John Gray

Alexandre Lollini

2005-05-31, 8:24 pm

on 30/05/05 20:47, Andrus < noeetasoftspam@onlin
e.ee> wrote:

> I installed Postgres 8 to Windows XP and added a line
>
> host all all 168.179.0.1/32 trust
>
> to pg_hba.conf file
>
>
> When connection from LAN to the Postgres with user name postgres I got error
>
> no pg_hba.conf entry for host "168.179.0.10", user "postgres", database
> "mydb", SSL off
>
>
> How to enable connection from LAN ?
>
> Andrus


The solution is to edit the postgresql.conf file
And then enable LAN connections.

But before doing so, I urge you :

Your line in pg_hba.conf as is is EXTREMELY INSECURE
I suggest to be more tight than "all" and "trust"

Use a comma separated list of users (exclude postgres)
Use a comma separated list of databases (excluding templates and pg_)

Use "password" instead of "trust", at least.

So create some users with limited grants, with a password, even if these are
script users.

No network can be trusted.

User postgres is (and should stay) the only one user capable of DROP
DATABASE x

I strongly recomment not to use user postgres for runtime remote
connections.


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com