X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5853056434 for ; Mon, 7 Mar 2005 15:48:03 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 05433-05 for ; Mon, 7 Mar 2005 15:48:01 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id 589D5564C8 for ; Mon, 7 Mar 2005 15:47:59 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1D8KFm-0004Hy-Mk for pgsql-jdbc@postgresql.org; Mon, 07 Mar 2005 16:34:42 +0100 Received: from c-24-0-215-239.client.comcast.net ([24.0.215.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Mar 2005 16:34:42 +0100 Received: from i.pilcher by c-24-0-215-239.client.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Mar 2005 16:34:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Ian Pilcher Subject: Re: ident auth postgres 7.4 fedora core 3 Date: Mon, 07 Mar 2005 09:33:03 -0600 Lines: 28 Message-ID: References: <20050307062838.11055.qmail@web30307.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-24-0-215-239.client.comcast.net User-Agent: Mozilla Thunderbird 0.9 (X11/20041127) X-Accept-Language: en-us, en In-Reply-To: <20050307062838.11055.qmail@web30307.mail.mud.yahoo.com> X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner-SpamScore: s X-MailScanner-From: sql-pgsql-jdbc@m.gmane.org X-MailScanner-To: pgsql-jdbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/40 X-Sequence-Number: 12433 Todd Gee wrote: > So I just upgraded my RH 9 box to Fedora Core 3 and ident auth > stopped working. I've been thru the ident authorization process > before and have become pretty conversant w/ it, but this issue is > really strange. It seems that ident auth is only failing w/ JDBC > connections. Since 1.4.2 (I believe), Java uses IPv6 by default. When a connection is made to an IPv4 address, it actually makes an IPv6 connection to an "IPv4-mapped address". So when you request a connection to 127.0.0.1, you actually get a connection to ::ffff:127.0.0.1. PostgreSQL doesn't know this, however; it asks the ident daemon, "who's connecting from 127.0.0.1?" The daemon answers "nobody". I got so frustrated looking for an ident daemon that handles this situation properly, that I decided to write my own. It's coming along, but it's not functional yet. In the meantime, the easiest approach is probably to tell Java to use IPv4. You can do this by setting the java.net.preferIPv4Stack system property to false. You may find this page helpful: http://java.sun.com/j2se/1.4.2/docs/guide/net/ipv6_guide/ -- ======================================================================== Ian Pilcher i.pilcher@comcast.net ========================================================================