This site can’t be reached - refused to connect. - Google cloud - google-cloud-platform

No matter what I do I will always get this come up when trying to load the website. - (This site can’t be reached - 35.188.89.14 refused to connect.)
I've tried creating different instances using various methods. I am doing everything that I have always done but no matter what I'm stuck in receiving this.
I don't know where to turn or whats causing it, I'm completely stuck.

In addition to the comment of #Ferregina Pelona, I elaborate the configuration of the Firewall section configuration, you need to configure this firewall to permit HTTP or HTTPS traffic to the VM or instance, use this public document for Create a VM instance from a public image
#Corey Mason I know you're new to GCP so I tried to create a step by step how you configure the HTTP or HTTPS, and also you can use the link above for more details of the steps.
Open GCP web console
Search Compute Engine
Locate your VM instance > Click your VM instance
Click Edit Button from the top
Locate "Networking" > Firewalls > Check 'Allow HTTP traffic' & Allow HTTPS traffic'
Save > Then try to browse again.

Related

Install MobSF in GCP, can't access port 8000

I want to install MobSF to test every my mobile apps that I develop before.
Since I don't have many environment in my local PC, so I create a compute engine in GCP.
All installation is running well and completed.
My problem is, I can't access MobSF via external/public IP from GCP.
when I ping to my external IP, it's no problem.
I think this problem caused by firewall configuration that I must open port 8000.
But I don't know how to create correct firewall setting.
I was try to create before, but still failed.
If you simply want to open port 8000 to the world, you can create a firewall rule as below (considering you are using the default vpc):
gcloud compute firewall-rules create "allow8000" --allow=tcp:8000
--source-ranges="0.0.0.0/0" --description="Allow 8000 external"
Ref: https://cloud.google.com/sdk/gcloud/reference/compute/firewall-rules/create
Edit: if you want to do a more granular firewall control to specify only one compute engine (the one you mentioned) you need either use network tags or allow only the private IP of that instance.
Also, I just noticed that you've started the app with the loopback address. Have you tried to start it up to listen to all interfaces "0.0.0.0"?
It is more likely that you might have not checked the ‘Allow HTTP traffic’ box of Firewall while creating the Virtual machine. If so, please follow the below mentioned steps and then try accessing your application from the web browser.
Click on the VM name
In the VM instance details page, click on EDIT button
Select the ‘Allow HTTP traffic’ under firewalls option and save.

Lost access to Mongo running on Google Cloud VM and can't ssh to it

I have a mongo instance running on a google cloud VM and my application lost access to it overnight. I'm not being able to SSH to it and Cloud console is looking weird.
VM Image: bitnami-mongodb-3-2-1-1-r04-linux-debian-7-x86-64
It first says I don't have permission to access the instance console page. Eventhough I'm the owner of the project and I can see it once I close the modal.
Then when I try to SSH using the built-in SSH tool I first get the following message. I see I have a VPC setup so I'm not really sure if that is actually expected or not.
If I try the alternative method I then get the following:
Does anyone has any hint on what could be the issue?
UPDATE:
VPC Firewall settings are set to allow SSH and the target project is set for it this rule:
I also have an external static IP set for this VM.
Just yesterday I could connect to my mongo instance through port 27017 and it stoped working without touching any GPC configuration.
Based on the information you have provided, it would seem that your GCE VM instance is currently utilizing IAP (Identity-Aware Proxy).
With this in mind, any overviewing the error message you are receiving, it would seem that your firewall rules aren't allowing connections on the SSH port. There should be an ingress rule to allow traffic to the instance on TCP port 22 (SSH) on that VPC network.
Generally, this is automatically created by GCP, on the default network it is typically called "default-allow-ssh", but you can also manually create it in the VPC Network -> Firewall rules tab. Make sure it applies to the instance in question (either through "All targets" or a target tag that matches the instance). You can read more about GCP firewall rules in the documentation.
Likewise, make sure you have an external IP or that you are following one of the options described here.

Unable to create server groups(create without tempplate) in gcp

I am following the code labs https://www.spinnaker.io/guides/tutorials/codelabs/gce-source-to-prod/ but I am facing a problem in creating server group in STEP-1. (Deploy stage). The page is getting loaded for infinite time. I think I can say It is not going beyond that point. I am able to come up to this step only if I am using AZURE or any other local machines. If I use Google Cloud Instance to do SSH tunneling I am not even able to create a application. Can you please help me.
You might need to do some additional troubleshooting to determine where the problem is. For example, run netstat on the machine to see whether it's listening on port 9000. See if you can create a firewall rule allowing inbound traffic on that port and then try to connect directly without using the SSH tunnel.

I don't understand how to get the realm server running on the AWS AMI

I got AWS running an instance of the AMI service using this ami-80347097 from the Realm website. So I have the EC2 instance up now, but I don't know what to do next. Sorry I'm completely new to this sort of thing.
What would be the server URL for the AWS Instance? And would the admin access token for the Object Server still be the same? Or would I have to do something specific in the EC2 Instance?
TT.TT
EDIT:
Ok so I got the Object dashboard to actually work and I am able to log in.
Thank you very much for helping me with that. My last step is actually getting connected to the Object Server. What would the Server URL for the Object Server be?
I tried using the realm://public URL:9080 for the server URL and got this error Realm Sync Error
Server Connection Problem
Assuming that you have successfully initiated the ami-80347097 instance with realm-object-server service running. At this point make sure you have enabled the 9080 port in your inbound rules section. This is necessary because you are going to access the realm object dashboard with the port enabled.
Steps:
Goto EC2 Dashboard
Select "Securit Group" under "Network & Security"
Click on the security group you have been using for the ami-80347097 instance
Once you have clicked the security group a configuration tab "Description", "Inbound", "Outbound", "Tags" will appear at the bottom of the screen
Add the port 9080 in your Inbound section as a Custom TCP Rule
Once you are done doing this,
Open a new browser window and go to http://localhost:9080. The login page for the Realm Dashboard will be displayed. Remember to replace localhost with the IP address of your server.

How to Configure Angular2 on AWS

I've had success building the Angular2 Quickstart app on my local machine, but I'd like to jump forward to setting it up on an AWS instance. The issue is that I ssh into the instance and so the npm start command doesn't load the app into my local browser. Even the "External" addresses provided don't work, even with an elastic IP assigned and the corresponding port opened. I've also looked through the node_modules/lite-server files to update any necessary configuration changes, but I haven't found how to alter it properly.
Can anyone point me to some resources that can help me get started wit angular2 on AWS?
So, first, there are some differences between your localhost and the aws EC2 instance.
Your computer is a graphical computer with a browser, the ec2 vm is just a command line based linux server and has no browser installed on it.
npm start, just like "grunt someTask" has extra stuff built into the steps that wouldn't make sense on a linux server... i.e. automatically opening your browser window and doing live-reload for active development, etc.
the EC2 vm is a place where you want to treat it more like beta server or production server, meaning that you dont start and stop your app with npm start, instead you want to start it with node yourAppFile.js, and you are merely running it to see if it works. You don't develop here.
Also, the ec2 vm itself is guarded / protected by a security group, and that allows very few ports to be accessed from the outside world by default, so you've got to go edit the "inbound rules" of the security group and add a rule that essentially allows: "custom" --> "the node port" --> "your IP". Doing so will make it possible to connect to it using the vm-public-ip:port-of-node-app which will look something like this in your browser: 56.128.17.42:3000. And because you put your own IP in that rule, no other IP addresses would be able to load it in their browsers... just you. If you were to say "0.0.0.0/0" in the ip field, that allows all users anywhere to connect.
I would test with curl on your local machine to make sure it's up and running. You can do that with "curl http://localhost:3000/ (change 3000 to whatever port you are running on).
If that is working okay, you may have an issue with security groups. Go to the security group topic on the EC2 page and select the security group for your server and make sure that you have the port opened from your IP address (you can google "what is my ip" if you don't know it). You can just open it the whole world if you're not worried about security.