Skip site navigation (1) Skip section navigation (2)

Re: Limiting number of connections to PostgreSQL per IP (not per DB/user)?

From: Heiko Wundram <modelnine(at)modelnine(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Limiting number of connections to PostgreSQL per IP (not per DB/user)?
Date: 2011-11-30 08:23:25
Message-ID: 4ED5E7FD.5000305@modelnine.org (view raw or flat)
Thread:
Lists: pgsql-general
Am 29.11.2011 23:49, schrieb Tom Lane:
> Another way that we've sometimes recommended people handle custom login
> restrictions is
> (1) use PAM for authentication
> (2) find or write a PAM plugin that makes the kind of check you want

Very interesting - I'll first try the connlimit approach hinted at by 
Filip, but if PostgreSQL does normal session setup/teardown using PAM 
(I've never used PAM authentication for PostgreSQL before), this should 
be a workable solution in case using iptables doesn't turn out to 
properly handle disconnected sessions quickly enough.

Thanks for pointing me at the PAM!

-- 
--- Heiko.

In response to

Responses

pgsql-general by date

Next:From: Magnus HaganderDate: 2011-11-30 08:26:50
Subject: Re: Limiting number of connections to PostgreSQL per IP (not per DB/user)?
Previous:From: Heiko WundramDate: 2011-11-30 08:20:17
Subject: Re: Limiting number of connections to PostgreSQL per IP (not per DB/user)?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group