Re: Remote Connection Help

From: Ekaterina Amez <ekaterina(dot)amez(at)zunibal(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Remote Connection Help
Date: 2019-11-21 14:30:21
Message-ID: 18043522-44f4-5ef4-ee15-310d04d4c201@zunibal.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message stan 2019-11-21 14:35:39 Re: Help with authentication on Debain/Ubuntu installation
Previous Message Michael Loftis 2019-11-21 14:23:50 Re: Extract transaction from WAL