Open Connection On PostgreSQL Server
Just in case the firewall is enabled, please also ensure that you configure your firewall rules properly for the connections between PostgreSQL server and the services of MetaDefender Distributed Cluster, which include MetaDefender Core services.
The guide here assumes we are using an SSL connection with PostgreSQL. With a non-SSL connection, please use host instead.
Windows
- Locate and modify
pg_hba.confconfiguration file within the PostgreSQL data directory. For example:C:\Program Files\PostgreSQL\16\data\pg_hba.conf.
hostssl all all 0.0.0.0/0 scram-sha-256In the above example, all source addresses from MetaDefender Distributed Cluster and MetaDefender Core services are permitted. Refer here for more details.
- Locate and modify
postgresql.confconfiguration file within the PostgreSQL data directory. For example:C:\Program Files\PostgreSQL\<version>\data\postgresql.conf.
listen_addresses = '*'The configuration above directs PostgreSQL server to permit incoming connections from all sources associated with MetaDefender Distributed Cluster and MetaDefender Core services. Learn more from here.
Linux
- Locate and modify the
pg_hba.confconfiguration file within the PostgreSQL data directory. For example:/var/lib/pgsql/<version>/data/pg_hba.conf.
hostssl all all 0.0.0.0/0 scram-sha-256In the above example, all source addresses from MetaDefender Distributed Cluster and MetaDefender Core services are permitted. Refer here for more details.
- Locate and modify the
postgresql.confconfiguration file within the PostgreSQL data directory. For example:/var/lib/pgsql/<version>/data/postgresql.conf.
listen_addresses = '*'The configuration above directs PostgreSQL server to permit incoming connections from all sources associated with MetaDefender Distributed Cluster and MetaDefender Core services. Learn more from here.
