Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2IuW-0007aV-OR for pgsql-general@arkaria.postgresql.org; Sat, 31 Mar 2018 15:59:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f2IuV-0005Gn-I6 for pgsql-general@arkaria.postgresql.org; Sat, 31 Mar 2018 15:59:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2IuV-0005Ge-90 for pgsql-general@lists.postgresql.org; Sat, 31 Mar 2018 15:59:19 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2IuQ-0008OZ-UO for pgsql-general@lists.postgresql.org; Sat, 31 Mar 2018 15:59:18 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 041A120D56; Sat, 31 Mar 2018 11:59:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sat, 31 Mar 2018 11:59:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=TS0id2 2rVtGig59ed1fQ3OtpkYSoaPJBJmWzUCZ2TPQ=; b=FAx1lF79pSiLeDW26x082H 6pJfCWGG6xIoWkY+BLpHuWNvrbhbwsCCXRV8n/bQOzE4hJ32rQNFcAkyQEOSkPMA 134WDiGf1G+ZiaR7ruqs3uezAyDO6jx4lwVEDNzbRSIcC2U/IUfh/A9F3WBOqIKh +Bxg3A0ozUWxZ5jkCM8KulNQ7J+nT+40Rv0Gpx5B9iIfVKppA/p4cWjdTZuYhTBM zo1AslD1GWG5ZpSuNfiKbAGc8lLvdgewTaU5suKcZ2S0GBjhvGV9nGRKzAAVql8o 7v8qqucDg9VCwLuj2vu+HvjWaPiVKNOBnHahZB46P3PkRPKAK+X2R/6wU06ZkcaQ == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id C6095E43C8; Sat, 31 Mar 2018 11:59:12 -0400 (EDT) Subject: Re: Problem with connection to host (wrong host) To: Mike Martin , pgsql-general@lists.postgresql.org References: From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <3606a8bb-897c-e0ab-ca63-2b495c5cba6b@2ndquadrant.com> Date: Sat, 31 Mar 2018 11:59:12 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/31/18 11:44, Mike Martin wrote: > Hi > I am just setting up a postgres server, details > Host 192.168.0.3 > pg_hba.conf > # TYPE  DATABASE        USER            ADDRESS                 METHOD > > # "local" is for Unix domain socket connections only > local   all             all                                     peer > # IPv4 local connections: > host    all             all             192.168.0.0/32 >             ident This entry should probably be something like 192.168.0.0/24 Writing .0/32 doesn't make much sense. > # IPv6 local connections: > host    all             all             127.0.0.1/32 >             ident > > host    all             all             ::1/128                 ident > > postgresql.conf > listen_addresses-'*' > > however when I try to connect from my laptop (ip 192.168.0.2) I get > > psql -h 192.168.0.3 -U usevideo -W > Password for user usevideo: > psql: FATAL:  no pg_hba.conf entry for host "192.168.0.2", user > "usevideo", database "usevideo", SSL off > > So a bit confused, is psql ignoring the host parameter .3 is the host you are connecting to, as seen from the client. .2 is the host your connection is coming from, as seen from the server. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services