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 1iXnTi-0003Kq-Ts for pgsql-general@arkaria.postgresql.org; Thu, 21 Nov 2019 14:30:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iXnTh-0006ln-CE for pgsql-general@arkaria.postgresql.org; Thu, 21 Nov 2019 14:30:37 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXnTg-0006lg-TL for pgsql-general@lists.postgresql.org; Thu, 21 Nov 2019 14:30:37 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXnTZ-0002tk-SJ for pgsql-general@lists.postgresql.org; Thu, 21 Nov 2019 14:30:36 +0000 Received: by mail-wr1-x42c.google.com with SMTP id y11so1558692wrt.6 for ; Thu, 21 Nov 2019 06:30:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zunibal-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=u5cZK5vKHwm4b0N5gAO2J+vrRViPCLNSHi/3vY+5xAo=; b=Ta5kZibun92aSh669xL9w4I5QcAsXPx8Q/uBk8JmC9rf9lwcv3+FQyN3AYKW6zjImF 1LDukxN8eHpc1bmyUCZCbb5oEOpBfGoiU6bQMUVu6CRZhV5JYtWdT+unW8GyyAHClbmJ ZNPk0YqV9BpFtAgkxADualyPmSmR8gHK5IqnS1+EKmPIgxHMY2FhIXCpn42t8H+Zuyu8 01nVwXjlhcvPEOEK8/n2gfWVmRbxGhtPN4WJU/L4w+g5VC1wCX2OdTRDxPlNmG748qeE HUOYA18Thypk+94/Z5b4WrQ/1arJdUhlVEElRKGw+ZNN1Yu0xB6g6zYA0iPP0+iEFhQU 1wiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=u5cZK5vKHwm4b0N5gAO2J+vrRViPCLNSHi/3vY+5xAo=; b=skprn6RVP34Q8luIV4yhDhJW8yY9G8KhozGabRMUIGEX2X/SFnF8poy16dhHu/4aWp AUVQzjRp4zQyAdoaxXK/4xzcaasXAk2N2PjlmxTEs8eecJcJ5uO4BtcfEqBi20Deae0P 5AWVs2xuwxIQ8YVIwnoRQO6fuxwoUhDPSu+F/P3cTiA/YO9ocpZ8/Mkbn1ukUTZdiI/1 PjWMjFSipiOFbM+1yh254/4HIciESw52m7sS1gcsDMuNCRPo1DjO5t2VT3ngwPa4nFnX wP3FkWPIvLiGQCfEXgrlubViRBBwQOyHa563zuJhTnbWVmO2/gO5lacCfdXCJrKZT4zh V34Q== X-Gm-Message-State: APjAAAUI3f2DhrihGnTagjkb8E/QRqDb4qstdyIdHPzU8XZdTOIhQdlA 5ytyeDpqxJwyh6t5oFKP3gAufnLOdyo= X-Google-Smtp-Source: APXvYqxYJKcxct+SRMmZoBVHR195yEg5RN1fcGEhmzckxad0phkzQa8W6MSJ6tFVPyfStmkVFyVExw== X-Received: by 2002:adf:f147:: with SMTP id y7mr11023023wro.236.1574346622794; Thu, 21 Nov 2019 06:30:22 -0800 (PST) Received: from [192.168.3.150] ([176.222.91.85]) by smtp.gmail.com with ESMTPSA id u187sm3281960wme.15.2019.11.21.06.30.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2019 06:30:22 -0800 (PST) Subject: Re: Remote Connection Help To: pgsql-general@lists.postgresql.org References: From: Ekaterina Amez Message-ID: <18043522-44f4-5ef4-ee15-310d04d4c201@zunibal.com> Date: Thu, 21 Nov 2019 15:30:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------3D1152E96A270D9C3FAE7CA3" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------3D1152E96A270D9C3FAE7CA3 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit El 21/11/19 a las 15:21, Jason L. Amerson escribió: > > I am at a loss for what to do. I have read article after article about > how to allow remote connections on my PostgreSQL server and none of > what the articles say do, worked for me. I have edited the > “postgresql.conf” file and changed “listen_address = ‘localhost’ to > listen_address = ‘*’. I have even tried it commented out and > uncommented and I get the same results. I also edited the > “pg_hba.conf” file and added the following at the end of the file: > > host all all 0.0.0.0/0 md5 > > host all all ::/0 md5 > For testing connection purposes I'm used to change md5 to trust, this way you won't have troubles with passwords nor users. > After that I restart the server, try to connect remotely, and I get > nowhere. I have even added the following rules to my iptables: > > iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d xx.xx.xx.xx > --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT > > iptables -A OUTPUT -p tcp -s xx.xx.xx.xx --sport 5432 -d 0/0 --dport > 1024:65535 -m state --state ESTABLISHED -j ACCEPT > Have you tried turning of iptables service? If you turn it off and try to connect remotely after that, you can test if the problem is in iptables or not. > My computer that is running the server is Ubuntu and it has a static > IP. I am trying to connect remotely with computers running Windows 10 > using the static IP. When I run pgAdmin from my Windows 10 machine, or > use the command line to connect, I get the following error: > > unable to connect to server: > > could not connect to server: Connection refused (Ox0000274D/10061) Is > the server running on host " xx.xx.xx.xx" and accepting > > TCP/IP connections on port 5432' > > I would like to be able to connect to my Ubuntu PostgreSQL server from > all Windows 10 machines as well as from a client on my Android phone > while away from home. That is my goal now. I am hoping that someone > can help me to get this working. This is been very frustrating. > --------------3D1152E96A270D9C3FAE7CA3 Content-Type: multipart/related; boundary="------------B8DB44475900EB10831A77A1" --------------B8DB44475900EB10831A77A1 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit El 21/11/19 a las 15:21, Jason L. Amerson escribió:

I am at a loss for what to do. I have read article after article about how to allow remote connections on my PostgreSQL server and none of what the articles say do, worked for me. I have edited the “postgresql.conf” file and changed “listen_address = ‘localhost’ to listen_address = ‘*’. I have even tried it commented out and uncommented and I get the same results. I also edited the “pg_hba.conf” file and added the following at the end of the file:

 

host all all 0.0.0.0/0 md5

host all all ::/0 md5


For testing connection purposes I'm used to change md5 to trust, this way you won't have troubles with passwords nor users.

 

After that I restart the server, try to connect remotely, and I get nowhere. I have even added the following rules to my iptables:

 

iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d xx.xx.xx.xx  --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT

 

iptables -A OUTPUT -p tcp -s xx.xx.xx.xx --sport 5432 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

Have you tried turning of iptables service? If you turn it off and try to connect remotely after that, you can test if the problem is in iptables or not.


 

My computer that is running the server is Ubuntu and it has a static IP. I am trying to connect remotely with computers running Windows 10 using the static IP. When I run pgAdmin from my Windows 10 machine, or use the command line to connect, I get the following error:

 

unable to connect to server:

 

could not connect to server: Connection refused (Ox0000274D/10061) Is the server running on host " xx.xx.xx.xx" and accepting

TCP/IP connections on port 5432'

 

I would like to be able to connect to my Ubuntu PostgreSQL server from all Windows 10 machines as well as from a client on my Android phone while away from home. That is my goal now. I am hoping that someone can help me to get this working. This is been very frustrating.

 

--------------B8DB44475900EB10831A77A1 Content-Type: image/gif; name="image001.gif" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="image001.gif" R0lGODlhZABkAPcAAJkAM/8zZswAM/8AM/+ZmcwzZv/M/8xm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