[postgis-users] setting up or accessing a host

Bistrais, Bob Bob.Bistrais at maine.gov
Tue Feb 14 08:46:14 PST 2012


Hi Ben,

 

I think I've had some success, thanks to your input.  But please let me
know if this is OK...

 

I edited pg_hba.conf, adding a line like this:

Host     all         all         mymachinename           md5

 

-where mymachinename is actually the fully qualified domain name of the
machine.

 

This works, in the sense that I can now display the data through other
than localhost.  But is this a good practice?  Am I breaching security,
or setting myself up for some other disaster?  

 

Thanks,

Bob  

 

________________________________

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ben
Madin
Sent: Tuesday, February 14, 2012 10:42 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] setting up or accessing a host

 

Bob,

 

the security is by default tight - but it sounds like you want host
based authentication (hba)

 

You will need to read this page a few times :

 

http://www.postgresql.org/docs/9.1/interactive/auth-pg-hba-conf.html

 

and then before you do anything else edit your postgresql.conf file
(about 60 lines down) to look like :

 

listen_addresses = '*'          # what IP address(es) to listen on;

                                        # comma-separated list of
addresses;

                                        # defaults to 'localhost', '*' =
all

                                        # (change requires restart)

 

Note the * in between the quotes (you may well have localhost there
now). 

 

Then edit your pg_hba.conf file.

 

note that you need to restart the server when you change the listen
addresses, but you only need to reload it when you edit the pg_hba.conf
file

 

Also note that this can be really painful for users with dynamic ip
address allocation.

 

good luck.

 

cheers

 

Ben

 

 

 

 

On 14/02/2012, at 11:04 PM, Bistrais, Bob wrote:





So at this point I figured out how to get a PostGIS layer to display
through MapServer, but that is only where host=localhost.  Now I'm
trying to figure out how to access the data from other machines.  I'm
looking through the documentation but haven't found out how yet.  Can
anyone point me in the right direction?

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120214/46548e2a/attachment.html>


More information about the postgis-users mailing list