Connect to postgresql server on OpenBSD

694 views Asked by At

Hi I've been hitting my head against the wall for a while on this one and can't figure it out. I'm trying to set up a postgresql server on my OpenBSD box and can't connect from outside. Currently I've updated the following:

  • Added the following line to pg_hba.conf:

    host all all 0.0.0.0/0 md5

  • Updated postgresql.conf listen addresses listenaddresses = '*'

  • Successfully restarted postgresql

  • Added the following line to pf.conf then restarted pf:

    pass in on em0 proto tcp to any port 5432

Then to test I ran pg_isready -h 10.0.0.236 -p 5432. The response says 10.0.0.236:5432 - no response. My local address of my server on the network is 10.0.0.236. If I run pg_isready -h 127.0.0.1 -p 5432 it says accepting connections.

Could someone please help, I'm really confused here.

1

There are 1 answers

0
Corey On

The issue was mistakenly editing /var/postgresql/postgresql/data/postgresql.conf over /var/postgresql/data/postgresql.conf. The previous was not the configured path, so all changes did not apply.