|
Home > Archive > PostgreSQL Administration > November 2006 > remote connections to Windows based server
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 |
remote connections to Windows based server
|
|
| Paul Forgey 2006-11-17, 7:14 pm |
| I am running the pre-built Windows version of postgresql 8.1. I have
a local LAN with a 10.6/16 network. Apparently there's something more
than what's in the FAQ or my interpretation of the manual to get
remote connections working.
pg_hba.conf:
host all all 10.6/16 md5
host all all 127.0.0.1/32 md5
postgresql.conf:
listen_address = '*'
C:] psql -U postgres -d postgres -h swift
psql: FATAL: no pg_hba.conf entry for host "10.6.1.226", user
"postgres", database "postgres", SSL off
C:] psql -U postgres -d postgres
Password for user postgres:
If I remove the 127.0.0.1 line from pg_hba.conf, I cannot connect at
all.
What more do I need to do?
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Jeff Frost 2006-11-17, 7:14 pm |
| On Fri, 17 Nov 2006, Paul Forgey wrote:
> I am running the pre-built Windows version of postgresql 8.1. I have a local
> LAN with a 10.6/16 network. Apparently there's something more than what's in
> the FAQ or my interpretation of the manual to get remote connections working.
>
> pg_hba.conf:
> host all all 10.6/16 md5
> host all all 127.0.0.1/32 md5
Paul,
Did you try:
host all all 10.6.0.0/16 md5
?
I believe you must list all 4 octets of the subnet. It says this in the docs:
The mask length indicates the number of high-order bits of the client IP
address that must match. Bits to the right of this must be zero in the given
IP address.
Which tells me the 0s have to be there.
--
Jeff Frost, Owner < jeff@frostconsulting
llc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Tom Lane 2006-11-17, 7:14 pm |
| Paul Forgey <paulf@aphrodite.com> writes:
> I am running the pre-built Windows version of postgresql 8.1. I have
> a local LAN with a 10.6/16 network. Apparently there's something more
> than what's in the FAQ or my interpretation of the manual to get
> remote connections working.
> pg_hba.conf:
> host all all 10.6/16 md5
> host all all 127.0.0.1/32 md5
> postgresql.conf:
> listen_address = '*'
> C:] psql -U postgres -d postgres -h swift
> psql: FATAL: no pg_hba.conf entry for host "10.6.1.226", user
> "postgres", database "postgres", SSL off
Hm, that sure looks like it should work, or at least not fail in that
particular way. Are you sure you restarted or SIGHUP'd the postmaster
after setting up the pg_hba.conf file?
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Tom Lane 2006-11-17, 7:14 pm |
| Jeff Frost < jeff@frostconsulting
llc.com> writes:
> I believe you must list all 4 octets of the subnet.
Oh, duh. The comments in inet_aton() show that it is interpreting
"10.6" in what most people nowadays would find a surprising way:
case 1: /* a -- 32 bits */
case 2: /* a.b -- 8.24 bits */
case 3: /* a.b.c -- 8.8.16 bits */
case 4: /* a.b.c.d -- 8.8.8.8 bits */
ie, it is read as if it were "10.0.0.6" ... hence no match, but also no
syntax error.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
| |
| Tom Lane 2006-11-17, 7:14 pm |
| Jeff Frost < jeff@frostconsulting
llc.com> writes:
> Paul, just add the 0s and you'll be golden.
I've tweaked the SGML docs to make it clearer that omitting trailing
zeroes here isn't a good idea.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Paul Forgey 2006-11-18, 12:13 am |
| On Nov 17, 2006, at 2:41 PM, Jeff Frost wrote:
> On Fri, 17 Nov 2006, Paul Forgey wrote:
>
>
> Paul,
>
> Did you try:
> host all all 10.6.0.0/16 md5
>
> ?
>
> I believe you must list all 4 octets of the subnet. It says this
> in the docs:
>
> The mask length indicates the number of high-order bits of the
> client IP address that must match. Bits to the right of this must
> be zero in the given IP address.
>
> Which tells me the 0s have to be there.
>
D'oh yes, I overlooked that. specifying 10.6.0.0 worked.
Thank you.
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
|
|
|
|
|