Monday, December 1, 2014

22 Enable PostgreSQL for remote connection in Centos 7 with firewall-cmd

Enable client authentication in pg_hba.conf

host    all             all             0.0.0.0/0               md5

Allow TCP/IP connection in postgresql.conf

listen_addresses = '*'          # what IP address(es) to listen on;

Need to restart the service after edit the postgresql.conf

systemctl status postgresql-inst1

Configure firewall-cmd

firewall-cmd --zone=public --add-port=7001/tcp --permanen
firewall-cmd --reload

image

Test connecting with pgadmin3

image

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates