Google cloud machine shutdown automaticaaly and and ip address change - google-app-engine

This is regarding VM machine bitnami-wordpress-77fb and we have hosted sanver.com on this machine.
The sanver.com was not resolving, we checked and found that the machine was shutdown and ip address changed.
The previous ip address of VM machine was 130.211.77.24 and now it has changed to 104.155.55.243.

By default, an ephemeral external IP address is assigned to Google Compute Engine instances for the lifetime of the instance. Instance reboot/shutdown would cause a new ephemeral IP address to be assigned to the instance.
See more information here:
https://cloud.google.com/compute/docs/instances-and-network#ephemeraladdress

Related

what does "On Your Network" in React mean

What does "On Your Network" mean when I run npm start in a React Project
see image
what does On Your Network: http://192.168.56.1:3000 mean
"On your network" in this context means from another computer that's connected to the same network (eg. the same Wifi network). You could browse your locally-hosted React app from your phone, for example. That IP address is your computer's local IP address (which is different from your public IP address).
"on your network" means that on your local network like your wifi you can access your web page in your local network (that can be your phone or any computer or internet enabled device on your wifi) with that ip address. just type http://192.168.56.1:3000 in your browser.

Access host variable from virtual machine

I have a react-app, I set up my app to run on a custom url using the HOST variable when starting the app, something like:
"scripts": {
"start": "HOST=my-local-website.com ..."
}
I need to access this url from a windows virtual machine to test it on IE11, before setting up the HOST variable I was able to access it simply from my IP address (192.168.X.XX:3000), having changed the HOST variable this doesn't work anymore.
Does anyone know how I can access it from a virtual machine?
Thank you in advance
I suggest to set environment variables in separate .env file like described in dicumentation.
In .env file set HOST=my-local-website.com to change host (it's unclear why official doc recommends prefixing all env variables with REACT_APP_)
Web site name my-local-website.com mapping to IP address of server (192.168.X.XX:3000 in your case) is done using DNS. This relate to networking and not to frameworks you use. So to be able to access your site by name you have to establish mapping between name of the site and IP address
I terms of DNS this mapping will look like
my-local-website.com A 192.168.X.XX
But for testing purpuses you can use simplified approach (I don't think that you have established DNS server in place). On Windows you can use hosts file which is located in C:\Windows\System32\drivers\etc folder. File is named hosts. Open it with any text editor (like notepad) and add string
192.168.X.XX my-local-website.com
IP address goes first, name last. Dont include port number (:3000) as it not related to DNS. hosts file should be changed on you test (client) PC, not on the PC where your app run.
You may also modify hosts on PC where you app runs to check if host has been configured correctly.
To check that everything is correct you may use ping like this
ping my-local-website.com
IP address should be printed if you configured everything correctly.
If you run your app on Windows host there may be problem with firewall configuration. If your app open on the same PC where it is started but not on another PC, most probaly that firewall blocks traffic. It can be WIndows Firewall or antivirus software if you have any.

Apache2 forwarding to an old ddns server

I own a domain for a website (let's just use "X.com"), which for now I'm hosting on my home computer. This domain name points to my dynamic dns (x.ddns.net) name in the web forwarding of the domain name registrar as I have a dynamic ip and I haven't yet found a better way to make sure that the IP is consistently updated.
I recently changed the ddns address (y.ddns.net) and now whenever I try to access my site either from accessing the main domain name (x.com), or via typing in the local lan ip (192.168.1.56) I keep getting forwarded back to my original ddns address (x.ddns.net) and the website won't load.
I've looked through all the settings I can find both locally, with the ddns provider and with the (x.com) registrar to try to pin point where the forward takes place but I'm totally stuck.
Host system is Ubuntu, everything is up-to-date, nothing in /etc/hosts file pointing to the old ddns.
Thanks in advance for any help.
Try DDNS on Cloudflare
Only problem is that you need to move your domain to cloudflare dns servers which is totally free to use.

difference between bind-web-address and volttron-central-address

I entered information for the volttron central instance as follows:
cat ~/.volttron-master/config
[volttron]
bind-web-address = http://192.168.1.31:8080
vip-address = tcp://192.168.1.31:22916
instance-name = "central tcp://192.168.1.31"
volttron-central-address = http://192.168.1.31:8080
What is the difference between bind-web-address and volttron-central-address?
In my opinion, the former is required for the web service, and the latter is for entering the address of the instance to control this instance.
Can the port number be the same?
The difference is context. Bind web address is opening a port on the machine that is going to be the web server. The volttron central address is used as the location to look for the web server. I hope that makes sense.
They should be the same when your Vc and VCP are on the same instance.

External IPs not assigned within VM

I have a couple of Centos 6 VMs that I am trying to setup. I assigned static IPs to them but when running ifconfig, I do not see the external IPs, just the internal IPs. Does Google not allow this capability?
In addition to what Anderson said, this is the command to query for the external IP from the instance itself:
curl "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip" -H "Metadata-Flavor: Google"
DHCP only supports requesting a single address. Google Compute Engine returns the internal IP address via DHCP, and maps the external assigned IP addresses to the VM using NAT.
If you want to fetch the assigned IP address from inside the VM, you could query the metadata server for that information.

Resources