Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMKsL-0003Hi-Fh for pgsql-jdbc@arkaria.postgresql.org; Wed, 28 Dec 2016 20:31:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cMKsK-0005W9-N6 for pgsql-jdbc@arkaria.postgresql.org; Wed, 28 Dec 2016 20:31:04 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cMKsK-0005Vy-7v for pgsql-jdbc@postgresql.org; Wed, 28 Dec 2016 20:31:04 +0000 Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMKsH-0002j6-3A for pgsql-jdbc@postgresql.org; Wed, 28 Dec 2016 20:31:03 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id uBSKUuv27182 for ; Wed, 28 Dec 2016 12:30:56 -0800 Subject: Re: Questions on use To: pgsql-jdbc@postgresql.org References: <51538255-cd71-41f3-3b98-c16d252c2f3f@hogranch.com> <9b5bf55a-85be-e6b0-71d1-6579ea76891e@hogranch.com> From: John R Pierce Message-ID: <6aa1f31f-5c7a-9fde-b7ce-024a79779f88@hogranch.com> Date: Wed, 28 Dec 2016 12:30:51 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------91E7F13CAA7DAB27ED048835" X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. --------------91E7F13CAA7DAB27ED048835 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 12/28/2016 11:55 AM, Rich Shepard wrote: > On Wed, 28 Dec 2016, John R Pierce wrote: > >> with psql, no -h and -h localhost are two different connection types. if >> you don't specify a -h, it uses a 'unix domain socket', > > Thanks, John. I believe that I understand the differences. Here, > /var/lib/pgsql/9.6/data/pg_hba.conf contains: > > # IPv4 local connections: > host all rshepard 192.168.55.0/24 trust > hostnossl all rshepard 192.168.55.0/24 trust I would never 'trust' a whole LAN subnet, I generally use md5 password authentication over a LAN. if these java processes are running on the same host as the database server, you probably want to allow connections from localhost (127.0.0.1 and ::1), frankly, I usually don't even like to use 'trust' on localhost. -- john r pierce, recycling bits in santa cruz --------------91E7F13CAA7DAB27ED048835 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 12/28/2016 11:55 AM, Rich Shepard wrote:
On Wed, 28 Dec 2016, John R Pierce wrote:

with psql, no -h  and -h localhost are two different connection types. if
you don't specify a -h, it uses a 'unix domain socket',

  Thanks, John. I believe that I understand the differences. Here,
/var/lib/pgsql/9.6/data/pg_hba.conf contains:

# IPv4 local connections:
host    all             rshepard        192.168.55.0/24         trust
hostnossl all           rshepard        192.168.55.0/24         trust

I would never 'trust' a whole LAN subnet, I generally use md5 password authentication over a LAN.     if these java processes are running on the same host as the database server, you probably want to allow connections from localhost (127.0.0.1 and ::1), frankly, I usually don't even like to use 'trust' on localhost.



-- 
john r pierce, recycling bits in santa cruz
--------------91E7F13CAA7DAB27ED048835--