How to whitelist IP addresses for PostgreSQL Database access

When working with Two Minute Reports, you might be required to whitelist IP addresses so that your database can accept connections from us. Without connecting to your database we can’t pull the data required for creating your reports.

Please note we don’t allow or execute any other query apart from “SELECT” queries from Two Minute Reports. Queries that modify your database’s data cannot be executed from Two Minute reports.

Whitelist IP address in PostgreSQL

Two Minute Reports’ servers are hosted by Amazon Web Services. Our IP addresses are & To whitelist these IP addresses for PostgreSQL databases, you’ll need to edit your pg_hba.conf file. Here’s how to do it:

Step 1

Locate the pg_hba.conf file, usually found at /etc/postgresql/VERSION_NUMBER/main/pg_hba.conf. You can confirm its location by running in postgres:

show hba_file;

You can learn more about the pg_hba.conf file here.

Step 2

Edit your pg_hba.conf file, scroll to the bottom where allowed connections are specified, and add these two lines:

# TYPE  DATABASE        USER            ADDRESS                 METHOD
...     ...     ...     ...
host    DATABASE_NAME   USERNAME        md5
host    DATABASE_NAME   USERNAME        md5

Make sure to replace “DATABASE_NAME” and “USERNAME” with your actual database name and username.


After making these changes, reload the database system to apply the new settings:

service postgres reload

Hope these instructions helped you. If you have any questions, don’t hesitate to reach out to us at

Tags: , ,

Was this helpful?