LAPP - accessing postgres from network

Asked by Peter Goodall

I have installed the 2009.02-hardy LAPP appliance on VMWare Server 2. The web administrations seem to work fine.
I cannot connect to the postgres server from another host on my home, single subnet, network. As far as I can tell,according to Webmin, iptables (and I'm new at this) is not loaded at boot. The allowed hosts for postgres allows everything on my network.

I need a very straight-forward beginners procedure, for setting up the LAPP appliance so that I can access postgres from its standard port from my local subnet via something like pgAdmin. I am finding it very hard to diagnose why the postgress standard port on its server is not visible on my network, while the Webmin and other ports are. I have tried several how-to web pages with no luck

I have spent a day and a half on this and gotten nowhere.

Thanks
--Peter G

Question information

Language:
English Edit question
Status:
Solved
For:
TurnKey Linux Edit question
Assignee:
No assignee Edit question
Solved by:
Alon Swartz
Solved:
Last query:
Last reply:
Revision history for this message
Best Alon Swartz (alonswartz) said :
#1

Hey Peter,

The PostgreSQL appliance is configured to listen for remote connections on all interfaces, as well as accept all remote connections. But, as you have mentioned, the LAPP appliance is not. This is due to the assumptions of how the appliances will be used, but you can ofcourse configure the appliances so they fit your use case.

The below should give you a running start:

# configure postgres to listen for remote connections
CONF=/etc/postgresql/8.3/main/postgresql.conf
sed --in-place "s/#listen_addresses = 'localhost'/listen_addresses = '*'/" $CONF

# configure postgres to accept remote connections
cat >> /etc/postgresql/8.3/main/pg_hba.conf <<EOF
# Accept all IPv4 connections (but should be set to a specific host/network when possible)
host all all 0.0.0.0/0 md5
EOF

Good luck!

Revision history for this message
Peter Goodall (pjgoodall) said :
#2

Hi Alon,

I think it was my entry in /etc/postgresql/8.3/main/pg_hba.conf causing the problem. I had incorrectly specified the subnet _and_ the authentication method.

I didn't spot the "PostgreSQL appliance" until after I had posted the question.

Thanks for your help!

Revision history for this message
Peter Goodall (pjgoodall) said :
#3

Thanks Alon Swartz, that solved my question.