T
T
TheSerKat2022-01-27 15:27:54
PostgreSQL
TheSerKat, 2022-01-27 15:27:54

How to allow all external connections to a PostgreSQL database?

Hello. There is a PostqreSQL 12 database. It is necessary to allow external connections to this database for the Bi analytics program.
In postqresql.conf listen_addresses = '*" Standard port :5432 opened, telnet gives a blank screen (like it should be)
61f28d6015395993170471.jpeg
61f28d6c328b3424621998.jpeg
Firewall: ufw allow 5432/tcp
Could it be a problem with SSL?
DBeaver gives FATAL: no pg_hba.conf entry for host " IP", user "user", database "DB", SSL on

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
galaxy, 2022-01-27
@galaxy

You don't have an entry in pg_hba.conf for external connections.
Something like host all all all md5.
Better instead of md5 -> scram-sha-256 and restrict access only to certain databases and users (i.e. not all/all, but your_db/your_user), but in any case, opening external access to the database is not a good idea.
By the way, in order for connections to be only via ssl, you need host -> hostssl

D
Dmitriy Loginov, 2022-01-27
@caramingo

It's hard to see on the screen, do you have SSL enabled? If so, are there valid certificates on the server? If not, shutdown and restart postgres.
Is the postgress server really working? what the netstat -tulpan command produces | grep 5432
In the config, instead of '*" I would enter localhost

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question