Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIGuZ-0001du-LE for pgsql-general@arkaria.postgresql.org; Wed, 09 Oct 2019 18:42:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iIGtZ-0001MK-BP for pgsql-general@arkaria.postgresql.org; Wed, 09 Oct 2019 18:41:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIGtY-0001M2-LO for pgsql-general@lists.postgresql.org; Wed, 09 Oct 2019 18:41:09 +0000 Received: from sonic304-20.consmr.mail.sg3.yahoo.com ([106.10.242.210]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iIGtV-0007ZG-FX for pgsql-general@lists.postgresql.org; Wed, 09 Oct 2019 18:41:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1570646459; bh=IrlCiWXX2vx2DULfMkg5sZGuMijbEH0yMva/iUhtC9s=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=ugVbb3eL0e05Dh87N53AKoXK9reBPK9jjQ9USiF0YSIYWJywrmVc1KwMZ2iZuqkDCQnzCxH22FxGSZja1RU7979RZszTHWtdbvgxpngPoNMKjxF/ArjehO8XQaU9Lr4Dzd6Lydo10w6pYeh1nqyxqkf8bzRZkDlSWEop92FO09+aFBw3As1AYvw3makequ7uHi6b9o+IqEeoFtLHYCu+wVCpp210yFlPIR1OoaYRxXVQzwavQyiz9/qeYLNKZagdoPSMFmoJMlWmnxSSuU5cDNfK9qwAsMQSEGBMivQp+o/6z0hz9ahB5T/AhnGW7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FUOVhUGDh11PS0C4_WWmmrmRm6 i7_XK.J3UDBalCNi5KU06sSYXR4hSRVcQvgxhNYkPcYWU3Ys3oT3hSiQdCgMuM2tbiHIuygVTPln 8bidGMR2Qe6BfiCFLHQceo_Zkjl6OMUdiRYa0zOJKBak_bf60WlEpzjWao0FUNZAbV7YnVutTAwm syLUYF6zQWWPz_6wJtfsY4Qs8uCkVCufvK7BCHEoLnkowKXMDn8GR_WHKDRUcEFFCtTmIGy4vWZo yclE2rOv_QUOYk.CHT5uChS8y96YHS6dtWzOQUDZGpKK.e.N.hI9McH_RM5ZgvhQSQY.Zf.XS0Q- - Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.sg3.yahoo.com with HTTP; Wed, 9 Oct 2019 18:40:59 +0000 Received: by smtp422.mail.sg3.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 9650330a21decb81b34833ed403d3049; Wed, 09 Oct 2019 18:40:54 +0000 (UTC) Subject: Re: Allowing client access To: Bob Jolliffe Cc: pgsql-general@lists.postgresql.org References: From: Timmy Siu Message-ID: <09a5e67e-646d-4efb-2879-d66da69e54f5@aol.com> Date: Thu, 10 Oct 2019 02:39:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dear Bob, Thank you.?? hostssl works out of the box!?? It does not require extra configuration.?? I can connect to my own pgsql server via pgadmin 4.?? I personally feel that Postgresql v11 is much clever than Mysql v5.7 (I haven't tried its v8). I also have tested postgres against TCP Wrappers but it is not compiled against TCP wrappers library.?? May I suggest the community to have postgres to work with TCP wrappers.?? Its security will be better. Regards, Timmy > Hi Timmy > > You need to use CIDR form in your pg_hba.conf. So: > > host all testuser 111.222.333.444/32 md5 > > Most likely you would probably want to ensure ssl connection if coming > over untrusted network. So, at minimum, this is better: > > hostssl all testuser 111.222.333.444/32 md5 > > This is better still: > > hostssl testdb testuser 111.222.333.444/32 md5 > > Better still (IMHO) is to keep it local and use ssh tunnel, but I > understand that might be difficult and not necessarily desirable, > depending on the context. > > Regards > Bob