So I'm running backtrack 5. Postgresql is already installed, but I need to change the settings so that the server accepts connections from other machines (instead of only accepting connections on localhost).

This is what I've changed.

/opt/metasploit/postgresql/scripts/ctl.sh
added "-h 192.168.1.111" (without any quotes) to the POSTGRESQL_START variable. This is the IP of my backtrack VM.

/opt/metasploit/config/database.yml
Changed 'localhost' to '192.168.1.111' (with single quotes)

/opt/metasploit/postgresql/data/postgresql.conf
changed #listen_address from 'localhost' to 'localhost,192.168.1.111' (with single quotes)

/opt/metasploit/postgresql/data/pg_hba.conf
Added the following lines:

host all all 192.168.1.1/32 md5
host all all 192.168.1.111 md5
host all all 192.168.1.109 md5


192.168.1.1/32 didn't appear to work, so I explicitly added the backtrack box and the box I want to remotely access the database from.


So, the problem is when I start msfconsole (or teamserver) I get the error "Failed to connect to the database: could not connect to server: Connection refused." and then the question "Is the server running on host "192.168.1.111" and accepting TCP/IP connections on port 7337?"

Since I edited all of that and rebooted the machine before trying to open a console, I would think it should be. But apparently I did something wrong. Any ideas what that could be?

Thanks.

Charles.