Closing port 22 on Google Cloud

I see when creating a new Google Cloud account, the firewall rules are set to allow traffic from all locations to SSH

default-allow-ssh IP ranges: 0.0.0.0/0

Can these rules be deleted safely or does Google Cloud depend on SSH being open to the world?


No, you can delete these rules if you don't need them.

Actually the rules depends more on what ports you want to allow to your resources and from what origins.

You can delete them and if needed create new ones being more specific. At the end, specify the firewall rules according to your requirements.