When I try to connect from a PostgreSQL client on the host system to the PostgreSQL server on a VirtualBox guest system, I get a "connection attempt failed" message.
The host system is Windows XP. I'm running VirtualBox 3.1.2. The guest system is Ubuntu 9.10 Karmic Koala with PostgreSQL 8.4.
I've forwarded port 5432 in VirtualBox as described in the manual and this post. When I run
vboxmanage getextradata vmname enumerate, I get these entries (among others):
Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/pgsql/GuestPort, Value: 5432 Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/pgsql/HostPort, Value: 5432 Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/pgsql/Protocol, Value: TCP
I configured PostgreSQL security in /etc/postgresql/8.4/main/pg_hba.conf with these entries:
# IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 192.168.1.0/24 md5 host all all 10.0.2.2/32 md5
Then I reloaded PostgreSQL with
sudo /etc/init.d/postgresql-8.4 reload.
For diagnostic purposes only, I've disabled my Windows firewall and my Ubuntu firewall (
sudo ufw disable).
Anybody know what steps I've missed?