From f1fe1c86b9342defa5c9c1d481f89f0b2eae6b56 Mon Sep 17 00:00:00 2001 From: Mohammad Awais Date: Sun, 21 Apr 2024 15:32:16 +0500 Subject: [PATCH] [MOD] DB Server Docs --- docs/db_server.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/db_server.md b/docs/db_server.md index 9af8370..ed6dedb 100644 --- a/docs/db_server.md +++ b/docs/db_server.md @@ -16,9 +16,8 @@ Uncomment and edit the listen_addresses attribute to start listening to start li On production dont allow all hosts, only your desired IPs +Replace following in pg_hba.conf - - listen_addresses = '*' Now edit the PostgreSQL access policy configuration file. @@ -26,15 +25,14 @@ Now edit the PostgreSQL access policy configuration file. vim /etc/postgresql/14/main/pg_hba.conf - Append a new connection policy (a pattern stands for [CONNECTION_TYPE][DATABASE][USER] [ADDRESS][METHOD]) in the bottom of the file. +Append a new connection policy (a pattern stands for [CONNECTION_TYPE][DATABASE][USER] [ADDRESS][METHOD]) in the bottom of the file. !!! danger "Caution" On production dont allow all hosts, only your desired IPs +Add following in pg_hba.conf - - host all all 0.0.0.0/0 md5 We are allowing TCP/IP connections (host) to all databases (all) for all users (all) with any IPv4 address (0.0.0.0/0) using an MD5 encrypted password for authentication (md5).