Open Connection On PostgreSQL Server

Applicable to use-case where users want to use a remote PostgreSQL server sitting on a different server from where MetaDefender Core resides.

Just in case the firewall is enabled, please also make sure to configure your firewall rule properly for the connections between PostgreSQL server and MetaDefender Core.

Windows

1.) Modify C:\Program Files\OPSWAT\MetaDefender Core\data\pg_data\pg_hba.conf

(If that’s a separate PostgreSQL server then you can find it in PostgreSQL data directory)

host all all 0.0.0.0/0 password

In above example, it means to accept any MetaDefender Core machine source address. Learn more at: https://www.postgresql.org/docs/9.1/auth-pg-hba-conf.html

2.) Create new file C:\Program Files\OPSWAT\MetaDefender Core\postgres\postgresql.conf

(If that’s a separate PostgreSQL server then you can find it in PostgreSQL data directory)

listen_addresses = '*'

In above example, it means to ask PostgreSQL server to start listening for all MetaDefender Core source connections. Learn more at https://www.postgresql.org/docs/9.1/runtime-config-connection.html

3.) Restart ometascan-postgres service

Linux

1.) Modify /var/lib/ometascan/pg_data/pg_hba.conf

(If that’s a separate PostgreSQL server then you can find it in PostgreSQL data directory)

host all all 0.0.0.0/0 password

2.) Create new file /usr/lib/ometascan/postgres/postgresql.conf

(If that’s a separate PostgreSQL server then you can find it in PostgreSQL data directory)

listen_addresses = '*'

3.) Restart ometascan-postgres service