Also may want to set 255.255.255.255/0 trust and then test access. I found that this seems to allow access from anywhere and then maybe tie it down.
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Tommy Cheng Sent: Sunday, March 15, 2009 10:50 PM To: mjgacto@ugr.es; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Problem with the conection
try adding these few lines: host database user 161.0.0.0/8 md5 host database user 161.0.0.0/8 trust # "local" is for Unix domain socket connections only local all all trust
make sure other "public" 161.x.x.x ip cannot access your server because i don't think 161.x.x.x is a private subnet.
On Fri, Mar 13, 2009 at 12:09 AM, <mjgacto@ugr.es> wrote:
I have problem with the conection to my database postgres. I have no problem with the conection in my server (150.xxx.xxx.xxx) and in the computers with ip near my server. For example if my server ip is 150.111.111.111 I can connect with 150.111.111.222 or 150.111.111.113
I connect using the following code: try{ Class.forName("org.postgresql.Driver").newInstance(); return DriverManager.getConnection("jdbc:postgresql://150.xxx.xxx.xxx/database?charSet=LATIN1", user,password); } catch(ClassNotFoundException e){ }
The problem happens when I try to connect with the java program to my server in a computer with 161.x.x.x ip. In the log file I find this message.