Gentoo Archives: gentoo-user

From: Joseph <syscon780@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only
Date: Wed, 24 Apr 2013 12:40:12
Message-Id: 20130424124011.GB6467@syscon7.inet
In Reply to: Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only by "J. Roeleveld"
1 On 04/24/13 07:11, J. Roeleveld wrote:
2 >On Wed, April 24, 2013 00:16, Joseph wrote:
3 >> On 04/23/13 20:10, J. Roeleveld wrote:
4 >
5 ><SNIP>
6 >
7 >
8 >>>I am guessing Apache is running on the same machine as your Postgresql
9 >>> server?
10 >>>
11 >>>In this case. The connection will always originate from localhost and
12 >>> Postgresql is behaving as it should.
13 >>>
14 >>>You will need to secure access to the website to avoid people accessing
15 >>> it.
16 >>>
17 >>
18 >> Yes, every machine I run has apache on it, so Postgresql server runs on
19 >> it as well.
20 >> If I'm connecting from another network machine to a server, how does it
21 >> originate from localhost?
22 >>
23 >> Something is not correct.
24 >
25 >I'll try to explain.
26 >
27 >When you connect to the website (Apache) the connection Apache sees
28 >originates from your machine.
29 >
30 >When Apache then needs to access PostgreSQL to access the data needed for
31 >the website, Postgresql sees the connection originating from Apache, which
32 >is running on the same machine.
33 >
34 >--
35 >Joost
36
37 Thank you for explanation.
38
39 That is what I'm confused about. When I connect to "pstgresql" database from the same machine as postgres is running on I can understand.
40 It is a local connection from localhost (127.0.0.1) so everybody is allowed but I don't understand why users on the local network can connect to my machine and login
41 using apache when their IP is different.
42
43 --
44 Joseph

Replies

Subject Author
Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only "J. Roeleveld" <joost@××××××××.org>