From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | mephysto <mephystoonhell(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL and iptables |
Date: | 2015-06-12 15:10:19 |
Message-ID: | CANu8Fiwh6x23qy_UfXb+w8Dda5B3HewDQ8r6R2L0Wm9Ft4qvNA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
The default port for PostgreSQL is 5432.
To allow external ip access, you need to specifcally add the ip's to the
pg_hba.conf on the PostgreSQL server
and then reload the PostgreSQL cluster. IE: pg_ctl reload
On Fri, Jun 12, 2015 at 10:58 AM, mephysto <mephystoonhell(at)gmail(dot)com> wrote:
> Hi there,
> I am trying to install a postgres cluster in a XenSever VM: I did not have
> any difficulties in compiling, installing and starting the DB. The problem
> is that I can not access to this db from an external machine: I tried to
> configure port forwarding through iptables as well as I did for ssh
> connections (ssh is working correctly).
>
> Actually I do not have psql in XenServer host, I am using a third server
> and
> this is iptables rules I am trying:
>
> iptables -t nat -A PREROUTING -p tcp --dport 5997 -j DNAT --to-destination
> 10.0.0.4:5997
>
>
> I also triet do scan port by nmap and I received this output:
>
> nmap -p 5997 pippo.eu
>
> Starting Nmap 5.00 ( http://nmap.org ) at 2015-06-12 16:38 CEST
> Interesting ports on pippo.eu (xxx.xxx.xxx.xxx):
> PORT STATE SERVICE
> 5997/tcp filtered ncd-pref
>
>
>
>
> This is psql output:
>
> psql -p 5997 -h pippo.eu
> psql: could not connect to server: No route to host
> Is the server running on host "pippo.eu" (xxx.xxx.xxx.xxx) and
> accepting
> TCP/IP connections on port 5997?
>
>
> Port 5997 is open in virtual machine and accept connections.
>
>
> Can anyone help me? I'm going crazy.... :(
>
> Thanks in advance.
>
> Meph
>
>
>
> --
> View this message in context:
> http://postgresql.nabble.com/PostgreSQL-and-iptables-tp5853587.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
From | Date | Subject | |
---|---|---|---|
Next Message | Mephysto | 2015-06-12 15:32:02 | Re: PostgreSQL and iptables |
Previous Message | mephysto | 2015-06-12 14:58:02 | PostgreSQL and iptables |