postgresql - How to setup the pg_hba.conf -


i need on correctly setup pg_hba.conf 2 specific postgres servers on different networks. first server on local network , second on cloud server.

since have setup syncronization between them, must make sure both can communicate.

the 'listen_address' setup '*', on postgresql.conf.

my question is, if add:

host all 0.0.0.0/0 trust

...to pg_hba.conf file on both servers communicate free of errors?

perhaps not best way it, since testing purposes perhaps solves problem now. better , safest solution please?

thank all

regards

paulo matos

since not have static ip system connecting database, should use method other "trust". can use md5, , put password .pgpass file on client.

you put client's host name, rather ip address, in 4th field. requires reverse dns work correctly (i don't know if dyndns.org supports that) , i've found overly fiddly , unreliable.

you want use ssl ("hostssl"). using md5 kind of protect password, eavesdropper can still see queries send , responses them.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -