From: | "Usama Dar" <munir(dot)usama(at)gmail(dot)com> |
---|---|
To: | "Klay Martens" <kmartens(at)wol(dot)co(dot)za> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: pg_hba.conf is driving me nuts |
Date: | 2007-12-16 19:27:02 |
Message-ID: | ff0e67090712161127r6a940db2v4c31ea68cc5b31bd@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
> Now, I have set up all the appropriate port forwarding, made sure that
> there
> are no problems with firewalls on the server.
Just to make sure there really is no issue with firewall did you try
something like telnet on postgres host and port , like telnet
buggy.pg.net5432, you should get something like
telnet buggy.pg.net 5432
Trying buggy.pg.net...
Connected to buggy.pg.net.unknowndomain (some ip)
Escape character is '^]'.
i mean inorder for you to be able to directly connect to the postgres over
WAN, you will need to open the postgres port and you should be able to
remotely access it, just like you would open ports for ssh and ftp and other
utilities.
> I am fairly sure this is a result of a problem with pf_hba.conf.Can anyone
> advise how to configure pg_hba.conf to permit connections from any subnet
> and ip?
If there is no issue with firewall and the port is open the following should
do it
host all all 0.0.0.0/0 trust
if you want to avoid opening the port for security reasons use ssh
tunneling, or port forwarding something like following
ssh -L 2525:localhost:5432 user(at)remotehost
this will map the local 2525 port onto the remote hosts 5432 port, now you
can simply connect to the postgres like a local instance
psql -h localhost -p 2525 -U postgres
--
Usama Munir Dar http://linkedin.com/in/usamadar
Consultant Architect
Cell:+92 321 5020666
Skype: usamadar
From | Date | Subject | |
---|---|---|---|
Next Message | Usama Dar | 2007-12-16 19:37:19 | Re: reading pg_stat_activity view |
Previous Message | Peter Eisentraut | 2007-12-16 13:57:39 | Re: pg_hba.conf is driving me nuts |