Introduction
How To Configure PostgreSQL To Accept All Incoming Connections?
Procedure
- Add the following line to the /var/lib/pgsql/data/pg_hba.conf file:
host samerole all 0.0.0.0/0 md5
- Run the following command to confirm that the changes are made:
grep -Ei "(^\s*host\b)" /var/lib/pgsql/data/pg_hba.conf
- Modify the main configuration file for PostgreSQL. Open /var/lib/pgsql/data/postgresql.conf and then replace the following line:
listen_addresses = '127.0.0.200, localhost' # what IP address(es) to listen on;
With:listen_addresses = '*' # what IP address(es) to listen on;
- Restart the Postgres server with the following script:
/scripts/restartsrv_postgresql
Please note that port 5432 may need to be opened in any firewall or security system.
Comments
0 comments
Article is closed for comments.