PostgreSQL configuration instructions need revising

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
12/28/2007 12:29:12 AM
Gravatar
Total Posts 148

PostgreSQL configuration instructions need revising

The existing instructions for configuring PostgreSQL for mojoPortal look like they were writting for PostgreSQL 7.4 and then an attempt was made to change them to work with PostgreSQL 8.x.  Those changes -- adding "-i" and poking a hole in firewall -- are not necessary for a local installation and just make the machine vulnerable to any future remotely exploitable hole in the PostgreSQL server.

At this point PostgreSQL 7.4 should be considered ancient; the most recent stable version is PostgreSQL 8.2.  It is highly unlikely that anyone is installing mojoPortal on a system with something before PostgreSQL 8.0.  The correct configuration instructions would have step 4 say:

4) Ensure that mojo can connect through tcpip:

If your database server and webserver are on the same machine, add these 2 lines to the the top of /var/lib/pgsql/data/pg_hba.conf to create the least privileged settings for mojo to connect from the local machine.

host mojoportal mojo ::1/128 password
host mojoportal mojo 127.0.0.1 255.255.255.255 password

If your database server and webserver are on different machines, make sure the firewall on the database server machine is open to tcp traffic on port 5432 from the webserver and see the PostgreSQL documentation for details on setting listen_addresses in postgresql.conf and setting up pg_hba.conf to allow access from remote hosts.


 

12/28/2007 10:29:27 AM
Gravatar
Total Posts 18439

Re: PostgreSQL configuration instructions need revising

Thanks Dean, I've updated the document.

Joe

12/28/2007 11:18:56 AM
Gravatar
Total Posts 148

Re: PostgreSQL configuration instructions need revising

You don't need the part that says:

in /var/lib/pgsql/data/postgresql.conf:
listen_addresses = '*'

if everything is on the same machine.  The default is to accept connections on the loopback interface.  Using:

listen_addresses = '*'

will cause it to accept connections on other interfaces as well.  If everything is on the same machine that just unnecessarily increases the attack surface.

--Dean

 

12/28/2007 11:41:27 AM
Gravatar
Total Posts 18439

Re: PostgreSQL configuration instructions need revising

Hi Dean,

Thats all true, but I need to connect from other machines on my local network and I think this is a common scenario.

I'll add a note that that part is only required to allow listening on all ip addresses.

Thanks,

Joe

You must sign in to post in the forums. This thread is closed to new posts.