Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google compute engine external ip

I have a nodejs app in google compute engine which I can access with the given appspot adress.

In networking I set the ip adress as static. I have added a firewall rule for allow any trafic , tcp:8080.

But when I try to go onto external ip adress on my browser it fails to load. So I cannot acces my site with external ip adress.

What should I do to be able to use external IP adress?

like image 447
Burak Gazi Avatar asked Aug 12 '26 02:08

Burak Gazi


1 Answers

So it seems like , when you use "gcloud preview app deploy" command it deploys to google cloud compute engine where the app is runing on port 8080.

To have a static IP to you project here are the steps to take:

1) In your code , create an app.yaml file. Forward port 80 to port 8080 (where your app is listening)

    network:
     forwarded_ports:
     - 80:8080

2) go head and deploy you app

   gcloud preview app deploy

3) In your google console go to NETWORKING > FIREWALL RULES and add new firewall rule for tcp:80

4) Go onto EXTERNAL IP ADDRESSES and change your apps IP address to static.

You will see your site runing on the external ip adress.

like image 123
Burak Gazi Avatar answered Aug 13 '26 17:08

Burak Gazi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!