7

I have 2 machines sitting on my desk and connected to the same IP network. I'm trying to connect an application from one machine to the postgres database on the other. At first the host with the application on it was giving me the PSQLException:

FATAL: no pg_hba.conf entry for host "192.168.1.18", user "user1", database "test", SSL off

So I edited my pg_hba.conf file to accept the IP address: 192.168.1.18, by adding the line below at the end of the file:

host    pnp         all         192.168.1.18      trust

Then I got another type of error message:

FATAL: missing or erroneous pg_hba.conf file

Is there anything I'm missing here?

Thanks, Lancelot

1 Answer 1

13

You have to specify the netmask of the host too. So either "192.168.1.18/32" or "192.168.1.18 255.255.255.255" instead of the bare IP address.

See the pg_hba.conf file chapter in the online manual for details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.