当前位置: 动力学知识库 > 问答 > 编程问答 >

postgresql - how to restrict specific hosts from connecting to pgbouncer?

问题描述:

I am running my postgres-9.2 on 6432 port and pgbouncer on 5432 port. Few of my colleagues client machines have the firewall connection permissions on 5432 port on server machine. But as a DB admin, I wanted to restrict some IP addresses from accessing the database.

But, though I block in the pg_hba.conf file, since the pgbouncer port is allowed, they are able to access.

I can block at the OS firewall level but I don't want to take the help of my system administrator. So, is there any way to restrict and deny IP addresses from accessing the pgbouncer as we generally do through pg_hba.conf for the postgresql.

Please suggest.

网友答案:

You could set auth_user in pgbouncer(5) Pgbouncer Config

"If auth_user is set, any user not specified in auth_file will be queried from pg_shadow in the database using auth_user. Auth_user’s password will be taken from auth_file."

分享给朋友:
您可能感兴趣的文章:
随机阅读: