Re: first time odbc

From: Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu>
To: "rod(at)iol(dot)ie" <rod(at)iol(dot)ie>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: first time odbc
Date: 2011-03-30 16:33:57
Message-ID: 93361C67E4EE844A80935863A4FF4B6C04E61359@Exch2010MB-2.univ.dir.wwu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

This is my pg_hba.conf file. I replaced x's with my ip address.
If I comment line 74, then no one can odbc to postgresql.
Lines 1 - 67 are all just commented text.

68 # TYPE DATABASE USER CIDR-ADDRESS METHOD
69
70 # "local" is for Unix domain socket connections only
71 local all all trust
72 # IPv4 local connections:
73 host all all 127.0.0.1/32 trust
74 host all all xxx.xxx.xxx.xxx 255.255.0.0 md5
75 # IPv6 local connections:
76 host all all ::1/128 trust

-----Original Message-----
From: Raymond O'Donnell [mailto:rod(at)iol(dot)ie]
Sent: Wednesday, March 30, 2011 8:48 AM
To: Marc Fromm
Cc: postgresql(at)finner(dot)de; pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] first time odbc

On 30/03/2011 15:54, Marc Fromm wrote:
> I only want the users to read data, thus I removed superuser and
> applied grant select.

Good stuff.

> If the listen_address is not a client filter, would it still be better
> to only have it listen to localhost and the few ip addresses that will
> need to odbc to the postgres database? Is it just not possible to
> assign listen_address = 'localhost, 1.ip.address, 2.ip.address'?

You're still misunderstanding listen_addresses - it has *nothing* to do with client addresses.

Example: I have a server with two network interfaces, a.b.c.x and a.b.c.y. If I want PG to listen on both interfaces, I can set listen_addresses = '*' (or list the two addresses explicitly). If I want it to listen *only* on a.b.c.x, then I set listen_addresses='a.b.c.x'.

> One other thing still, if in the pg_hba.conf file I do not include any
> ip addresses I cannot connect to the database. If I enter just one ip
> address, any computer can connect to the database, even though some
> machines have static ip addresses and others have dhcp address from a
> completely different subnet. Do you know why this is? I figured the
> pg_hba.conf file controlled access by ip address, based on other
> googled articles.

Can you show us your pg_hba.conf?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Marco Gaiarin 2011-04-01 16:04:16 [gaio@sv.lnf.it: [gaio@sv.lnf.it: Centura 1.5.1: moving from ODBC 8 to 9, some trouble]]
Previous Message Raymond O'Donnell 2011-03-30 15:47:37 Re: first time odbc