Heykuki News

TopNewBestAskShowJobs
TopNewBestAskShowJobs
Show HN: Script to update GCP firewall rule to allow only your public IP
pypi.org
1 point
peterdemin
4 years ago
I host my personal VM on Google Cloud Platform and access it mostly through SSH and HTTPS. As a hardening step, I've set up GCP firewall to only allow my home IP address.

But my ISP changes my public IP pretty often, so I have to log in to the GCP console and change firewall rule there every time.

I wrote a small Python script that automates this routine, and I thought maybe it could be useful to others.