Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7C11B1337B95 for ; Wed, 22 Dec 2010 20:12:48 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 50597-01 for ; Thu, 23 Dec 2010 00:12:41 +0000 (UTC) X-Greylist: delayed 00:06:41.372669 by SQLgrey-1.7.6 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.216.181]) by mail.postgresql.org (Postfix) with ESMTP id D46D613364DE for ; Wed, 22 Dec 2010 20:12:40 -0400 (AST) Received: by qyk12 with SMTP id 12so6272604qyk.19 for ; Wed, 22 Dec 2010 16:12:41 -0800 (PST) Received: by 10.224.6.145 with SMTP id 17mr6865469qaz.386.1293062759229; Wed, 22 Dec 2010 16:05:59 -0800 (PST) Received: from Craig-Jamess-MacBook-Pro.local (wsip-70-167-124-126.sd.sd.cox.net [70.167.124.126]) by mx.google.com with ESMTPS id l12sm4096272qcu.7.2010.12.22.16.05.57 (version=SSLv3 cipher=RC4-MD5); Wed, 22 Dec 2010 16:05:58 -0800 (PST) Message-ID: <4D129264.2010701@emolecules.com> Date: Wed, 22 Dec 2010 16:05:56 -0800 From: Craig James User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Securing a remotely accessible PostgreSQL server References: <4D122D10.7090805@saucetel.com> <4D1227A30200002500038A0C@gw.wicourts.gov> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.6 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201012/171 X-Sequence-Number: 36400 > Josh wrote: > > I am looking for suggestions on how best to secure a server that > is accessible via the internet. Even account creation for the > database is open to the world. Does anybody have any extra changes > they would make to postgresql.conf or OS changes they would > suggest? Perhaps some default permissions that would be best > revoked? > > The system setup is currently a Linux box running PostgreSQL 8.4 > My pg_hba.conf already limits remote connections to one database > and one particular role. You don't give any details about your users or how/why they need this access so it's hard to give good advice. But one possibility is to use SSH tunneling, so that your users have to log in to your server first using a protocol that's pretty secure. ssh -L5432:localhost:5432 user@host.com Then the user connects locally instead of directly. On the user's computer: psql -h localhost dbname We've used this technique when a developer had to work from a remote location. There is no direct access to Postgres at all, yet you can work remotely and securely. Craig