My Google Cloud Platform server is suddenly unable to download anything via wget, git clone, and unable to apt-get install anything.

--2019-05-07 14:48:02-- http://google.com/ Resolving google.com (google.com)... failed: Temporary failure in name resolution.

When trying to git clone repositories:

ssh: Could not resolve hostname bitbucket.org: Temporary failure in name resolution fatal: Could not read from remote repository.

I did not make any changes to any configuration files. I am able to SSH into other servers from this GCP server, so it's not an internet connection problem. I'm also able to git clone the same repository successfully on other servers.

1 Answer 1


Problem: Above mentioned instance outbound internet connectivity is restricted.


  • Your local machine/laptop/desktop ---> Internet ---> ssh into your GCP your. ( In bound for the GCP machine.)
  • Your firewall at GCP and Iptable in GCP machine must be allowing incoming connections to the GCP machine.


  • GCP machine ---> git clone ---> Internet ( Outbound for the GCP machine.)
  • Here we have an issue.

How to resolve it:

  • Check, your firewall outbound connections at GCP.
  • Login into the GCP mchine and make sure outbound connections are allowed in iptables as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .