Can't Access Google Cloud Compute VM Instance using external IP

0

I have set up and enable a VM to Allow HTTP traffic and Allow HTTPS traffic but i cannot access the external IP in a browser. Im using the VM for web development testing and need to see changes made. The external IP address is listed as (ephemeral) but from what i've read, all this means is that the IP will not persist through shutoff/restart.

Tyler

Posted 2018-11-24T14:57:38.937

Reputation: 43

What error are you getting? Timeout / Connection refused? Did you try to follow this guide from google? https://cloud.google.com/compute/docs/tutorials/basic-webserver-apache (especially the firewall rules part)

– User025 – 2018-11-24T15:01:02.393

After about 30 seconds i get "This site can’t be reached 35.232.24.81 took too long to respond.", would it have anything to do with the .htaccess active directory? Im trying to find that to change the directory. – Tyler – 2018-11-24T15:12:00.243

This could mean that your web service is not running, please try the curl suggestion from Steven' answer and check if apache or nginx is running – User025 – 2018-11-24T15:32:00.527

How exactly did you "allow" the traffic? – Albin – 2018-11-24T17:02:23.177

Answers

0

While the mass of my experience with cloud based products is AWS based ...

Please verify your firewall (Security Group Rule) configuration for this VM. Please verify that port 80 (and 443 if using SSL) are enabled to allow traffic from 0.0.0.0/0 to your VM.

When configuring Security Group Rules in the cloud 0.0.0.0/0 is to indicate to/from anywhere. So in this case you are allowing connections from anywhere (0.0.0.0/0) to connect to your VM.

Then please verify your webserver configuration. Are you using Apache or Nginx?

Can you curl the website from the terminal? e.g. curl localhost By using the curl command you will be able to determine that the webserver is in fact alive and ready for connections to minimize the troubleshooting time while you figure out the security group rules.

Steven K7FAQ

Posted 2018-11-24T14:57:38.937

Reputation: 101

While there are times where you want to restrict access to a cloud resource, you would specify the IP address(es) that you permit connections from. While troubleshooting Security Group Rules I find it easiest to start with 0.0.0.0/0, confirm connections are working as expected then replace 0.0.0.0/0 with a specific address(es). – Steven K7FAQ – 2018-11-24T17:20:51.850

0

Thank you for the assistance, by not paying attention and enabling both HTTPS and HTTP traffic google adds a secure connection to the IP url but I never had a certificate for the VM thus removing the 's' from the URL it generates in https:// allowed me access.

Tyler

Posted 2018-11-24T14:57:38.937

Reputation: 43