pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedremote connections to Windows based server
7+ messages / 3 participants
[nested] [flat]
* remote connections to Windows based server
@ 2006-11-17 21:39 Paul Forgey <paulf@aphrodite.com>
0 siblings, 2 replies; 7+ messages in thread
From: Paul Forgey @ 2006-11-17 21:39 UTC (permalink / raw)
To: pgsql-admin
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?
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: remote connections to Windows based server
@ 2006-11-17 22:41 Jeff Frost <jeff@frostconsultingllc.com>
parent: Paul Forgey <paulf@aphrodite.com>
1 sibling, 2 replies; 7+ messages in thread
From: Jeff Frost @ 2006-11-17 22:41 UTC (permalink / raw)
To: Paul Forgey <paulf@aphrodite.com>; +Cc: pgsql-admin
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@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: remote connections to Windows based server
@ 2006-11-17 22:43 Tom Lane <tgl@sss.pgh.pa.us>
parent: Paul Forgey <paulf@aphrodite.com>
1 sibling, 0 replies; 7+ messages in thread
From: Tom Lane @ 2006-11-17 22:43 UTC (permalink / raw)
To: Paul Forgey <paulf@aphrodite.com>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: remote connections to Windows based server
@ 2006-11-17 22:54 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jeff Frost <jeff@frostconsultingllc.com>
1 sibling, 1 reply; 7+ messages in thread
From: Tom Lane @ 2006-11-17 22:54 UTC (permalink / raw)
To: Jeff Frost <jeff@frostconsultingllc.com>; +Cc: Paul Forgey <paulf@aphrodite.com>; pgsql-admin
Jeff Frost <jeff@frostconsultingllc.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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: remote connections to Windows based server
@ 2006-11-17 22:58 Jeff Frost <jeff@frostconsultingllc.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Frost @ 2006-11-17 22:58 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Paul Forgey <paulf@aphrodite.com>; pgsql-admin
On Fri, 17 Nov 2006, Tom Lane wrote:
> Jeff Frost <jeff@frostconsultingllc.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.
Wow, I sure would've never guessed that.
I confirmed the behavior on my windows test server here.
Paul, just add the 0s and you'll be golden.
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: remote connections to Windows based server
@ 2006-11-17 23:26 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jeff Frost <jeff@frostconsultingllc.com>
0 siblings, 0 replies; 7+ messages in thread
From: Tom Lane @ 2006-11-17 23:26 UTC (permalink / raw)
To: Jeff Frost <jeff@frostconsultingllc.com>; +Cc: Paul Forgey <paulf@aphrodite.com>; pgsql-admin
Jeff Frost <jeff@frostconsultingllc.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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: remote connections to Windows based server
@ 2006-11-18 00:22 Paul Forgey <paulf@aphrodite.com>
parent: Jeff Frost <jeff@frostconsultingllc.com>
1 sibling, 0 replies; 7+ messages in thread
From: Paul Forgey @ 2006-11-18 00:22 UTC (permalink / raw)
To: Jeff Frost <jeff@frostconsultingllc.com>; +Cc: pgsql-admin
On Nov 17, 2006, at 2:41 PM, Jeff Frost wrote:
> 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.
>
D'oh yes, I overlooked that. specifying 10.6.0.0 worked.
Thank you.
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2006-11-18 00:22 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-17 21:39 remote connections to Windows based server Paul Forgey <paulf@aphrodite.com>
2006-11-17 22:41 ` Jeff Frost <jeff@frostconsultingllc.com>
2006-11-17 22:54 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-11-17 22:58 ` Jeff Frost <jeff@frostconsultingllc.com>
2006-11-17 23:26 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-11-18 00:22 ` Paul Forgey <paulf@aphrodite.com>
2006-11-17 22:43 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox