Anuj Pankaj <anujp(at)cybage(dot)com> writes:
> What am I suppose to change in pg_hba.conf file?
If you're getting "Connection refused", no amount of changing
pg_hba.conf will change the result, because that's not where your
problem is. This error implies the postmaster isn't listening at all on
the specified port, or else there's a firewall blocking connections.
Make sure that listen_addresses is set to * in postgresql.conf, and
check your system packet-filtering configuration.
regards, tom lane