Postgresql is not allowed to be connected remotely

Could someone help take a look this weird problem? I'm still not able to connect remotely to my Postgresql.

My Steps:

  • Download and install the latest Postgresql to my local machine
  • Setup postgresql
  • Create a DB
  • Modify "pg_hba", add row "host all all 0.0.0.0/0 md5"
  • Modify "postgresql.conf", make sure "listen_addresses = '*'"
  • Restart postgresql service
  • Open local PgAdmin, and connect to DB <-- Success!
  • From Remote desktop, do the same thing as #7 <-- Failed!
  • Error Message:

    "Server doesn't listen" "Could not connect to server......accepting TCP/IP connections on port 5432?"

  • I found "TCP 0.0.0.0:5432 Listening" when I type "netstat -a"
  • I checked firewall, it's not enabled ......
  • Can someone please help? Does anyone encounter this situation? PS, my os is Winserver 2008

    Thanks in advance~


    If you're connecting to the local machine via RDP then you'll be connecting via localhost and no firewall or LAN/WAN/NAT settings should affect pgadmin.

    When you edit the pg_hba and postgresql.conf files Server 2008 doesn't usually let you edit them directly where they are. I usually copy them out edit them and then paste them back in. You'll need to authorise the paste from an Admin account.

    I usually have a separate rule in "pg_hba" with "host all all 127.0.0.1/32 md5" for local connections. Also ensure when you restart the service that it is running under the user "postgres" and not as some other user.

    链接地址: http://www.djcxy.com/p/25504.html

    上一篇: Postgresql Centos问题

    下一篇: Postgresql不允许远程连接