Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntBqx-0001By-G3 for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 17:28:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntBqv-0005fl-UE for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 17:28:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntBqv-0005fU-HO for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 17:28:21 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ntBqt-0003yY-Bx for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 17:28:20 +0000 Received: by mail-wr1-x42c.google.com with SMTP id t13so3194762wrg.9 for ; Mon, 23 May 2022 10:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:to:from :subject:content-transfer-encoding; bh=HnCLi4zCvFJ16qQ6/LrHJsD5udX778PudDk8NHSWU1k=; b=kCxHq+P8LIu9oVZLJZ9m6eausYKXpxHo33qGOn99CQ+ROtU73u9iaxkbTQNN/T7b/I 3I2+JLkQuG3oRxiN/QTkHMCmgwcs8yxrgSFTdFmPfAMmHnNSfSV1wVw9hZImKHiwYxSw 6k1Wbw1Ft83PaYNutK18FvsK65PYwQowS20PHEIJ6LbSOratKolQsEzgmxudMlcBUXA9 tBBtakL026vLQtxGc0Of8Gm2a1GySNEXy5QIM5AXX0yuBMHCqWbqPCUdURL8HHH0uXlc lskmETk31zt9ZYN3LMHpjJxCFSEPwivwKSA0q0dJXQMBWn5n7v7JIAi8P3vDljfU2Kjl yuCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:from:subject:content-transfer-encoding; bh=HnCLi4zCvFJ16qQ6/LrHJsD5udX778PudDk8NHSWU1k=; b=Bqbhw6cMqhwCj/c7KMjklOwYtIKH1pXP8FNelZEAtSZtc/TOYuwNePQeoYHL+EopPH 6KwchgEL5NPyH+LYheFuwBd9MI3zpNU9xWiYqANzws+EzZUXj9b6FfyswKgjQ0fqEJ+Y J0bCKB72M1fsttQuQpqmctuFP9I0KL0EPGb/uht6Q1XXj5uryIPLeQ2Oolst+S04tYwT cwp5jjE0Dolp3o5nl2zIWDLu9g0fDpLtdmPk0HJHkeH26jpOSNqO9rD1AMbnyZBFsDb0 5bNi1nArmH9i3ce9rmGs/tCDmAVABxvSiwLv1dyYSYpPaHc9O8Bs75Vp/eFua/+DGvDj raqQ== X-Gm-Message-State: AOAM532W2nan8BHbjOt9R321yTZksARI7wJbibKzWNZoDQy31PYpWqmp dTW+yyOYWZLBGkDz/vRMTK2ElS1lZQ== X-Google-Smtp-Source: ABdhPJzB7VZB/LyDZQ8PP4FhVtme1BUyJCMWL3mPNc/Cel0W78r3bbIifMEWX5rgPBUmQGRkfaQx2g== X-Received: by 2002:adf:e842:0:b0:20d:db6:9e7 with SMTP id d2-20020adfe842000000b0020d0db609e7mr19667696wrn.276.1653326897610; Mon, 23 May 2022 10:28:17 -0700 (PDT) Received: from [192.168.0.101] ([46.219.208.85]) by smtp.gmail.com with ESMTPSA id s28-20020adf979c000000b0020e68dd2598sm10491176wrb.97.2022.05.23.10.28.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 10:28:17 -0700 (PDT) Message-ID: Date: Mon, 23 May 2022 20:28:15 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-US To: pgsql-general@lists.postgresql.org From: "dzagashev@gmail.com" Subject: psql connect over ssl load balancer Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi. I want to secure connections to postgress server usings SSL. My server is deployed on google cloud behind SSL load balancer, which terminates SSL connections (using SSL certificates, issued by google) and forwards decrypted traffic to the posgres server. I can connect without problems from nodejs using TLS socket. But standard psql client don't working: $ PGSSLMODE=require psql -h proxy.softvisio.net psql: error: connection to server at "proxy.softvisio.net" (34.149.158.159), port 5432 failed: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. Seems, that psql will not work withour private keys? But I am not sure. Could somebody help me to understand, how I can use it?