Postgresql client authentication issue
I am struggling with the postgresql's access control file开发者_C百科 pg_hba.conf... it's never happy, and all I want to do is straight forward: A) Allow access to ALL from localhost B) Allow access to ALL from 10.8.0.* (VPN) C) Deny ALL remaining
I've read the wiki page on the pgsql's official website, but can't figure out what's wrong with my configuration; I connect to the VPN (which works nice) and then attempt to connect to pgsql using pgadmin => fails; I also try to install a simple punBB forum (on the same machine as the database server) and I get can't connect to database... It's all configuration issue...
Here's a sample of my current permissions:
host all all 10.8.0.0/24 md5
local all postgres ident
local all all ident
host all all 127.0.0.1/32 trust
Any ideas?
I have no idea which "wiki page on the pgsql's official website" have you read but the manual is quite nice and has examples:
# Allow any user on the local system to connect to any database with
# any database user name using Unix-domain sockets (the default for local
# connections).
#
# TYPE DATABASE USER CIDR-ADDRESS METHOD
local all all trust
# The same using local loopback TCP/IP connections.
#
# TYPE DATABASE USER CIDR-ADDRESS METHOD
host all all 127.0.0.1/32 trust
# Allow any user from 10.8.0.0/24 to connect to all
# databases if the user's password is correctly supplied.
#
# TYPE DATABASE USER CIDR-ADDRESS METHOD
host all all 10.8.0.0/24 md5
And don't forget to reload the server after the changes.
精彩评论