External access to Azure PostgreSQL database

geoff belair 11 Reputation points
2020-08-26T22:35:36.33+00:00

I am trying Azure PostgreSQL for the first time. After using their (start with a pre-set configuration) to provision the system, I don't seem to be able to connect externally.

name@Azure:~$ psql --host=mendixdb.canadacentral.cloudapp.azure.com --port=5432 --username=removedforpost --dbname=postgres
psql: error: could not connect to server: FATAL: no pg_hba.conf entry for host "104.42.23.80", user "removedforpost", database "postgres", SSL off

I have added port 5432 inbound on the provided firewall rule set.

Anybody know about additional documentation or steps required to get connected externally?

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,606 Reputation points
    2020-08-27T07:09:01.287+00:00

    Hi @geoff belair , to make it work, you need to add the host entry into firewall rule set as below (Host entry in your case is mentioned in error message '104.42.23.80')

    Go to Settings -> Connection Security, and configure the firewall. Then try running the command again, you should be able to connect.

    20669-image.png

    ----------

    If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.