title: How to connect to remote PostgreSQL server on google compute engine?
body: <p>I have installed a PostgreSQL on google cloud and I want to be able to access it remotely from my PC using preferably pg-admin. </p>
  
  <p>I do get the following error when I try to connect to my instance:</p>
  
  <blockquote>
    <p>Unable to connect to server:</p>
    
    <p>could not connect to server: Connection refused (0x0000274D/10061) Is
    the server running on host "[external IP of my VM instance]" and
    accepting TCP/IP connections on port 5432?</p>
  </blockquote>
  
  <p>I think this could because google cloud firewall is blocking me (maybe!), I specified the following firewall for my instance, I use my ip address to define  Source filters:
  <a href="https://i.stack.imgur.com/z5E8R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z5E8R.png" alt="enter image description here"></a></p>
  
  <p>am I missing something because I cant still access this, can someone please help me I have no idea anymore, I have check many tutorials and I have done many things that I though should fix this. anyone any idea?</p>