Connect Pgadmin via SSH Google Cloud

Asked

Viewed 333 times

0

Good people, let’s go. I have a server in Google Cloud, and I installed the postgres and everything ok, is working beauty, then on my machine I installed the pgAdmin III and made the configuration to connect to the bank, initially worked, after it stopped working, because my internet crashed and my IP changed, and I had to make a rule in the google firewall freeing access to my IP, so I saw here a problem, because every time I change my IP I have to change in the firewall..

I thought about making the connection via SSH, but I have no idea how to do this, I did not find tutorials or anything..

Does anyone have any idea how to solve my problem?

Thank you

  • who blocks is the firewall of the server, or the postgresql itself ? If it is the firewall, there is no way to release a track, or a domain ? How was the setup you made ?

  • the server firewall, options are: Intervalos de IP, SUB-REDES, Tags de Origem

1 answer

1

From what I’ve been reading in the google cloud documentation, you can do a firewall release by releasing a range of ips.

only for testing, release any ip on the postgresql port:

--network my-network \
--action allow \
--direction ingress \
--rules tcp:5432 \
--source-ranges 0.0.0.0/0 \
--priority 50 \

If you want to improve security, releasing only a known range, it would be better, for example, only the range that belongs to Brazil.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.