When does an Elastic Beanstalk Instance IP address change? - amazon-elastic-beanstalk

I want to be able to change the IP address on my Elastic Beanstalk instance regularly. It doesn't seem to change every time I restart it or change the code, how can I force it to update the IP address?

The IP Address changes when you do an Environment Rebuild. During a rebuild, the underlying resources are all destroyed and created again resulting in your instances having different IP addresses.
I have posted a comprehensive guide on how this can be achieved in another question.

Related

Moving static IP Address on GCE without teardown

I'm replacing a legacy GCE VM with an static external IP address with a new VM with that same address.
I want to validate that the new VM works before moving the external IP address to the new machine and tearing down the old one.
Is there a way to do this without downtime and tearing down the old VM?
I found an answer on my own. This can be done through the following steps:
Going to the old VM and stopping it as an external IP cannot be released if it's in use.
Then go to IP addresses within that VPC network and select Release Static Address.
Reserve that IP address and assign to the new VM.
Note that these steps cannot be performed without downtime of the old VM as it will need to be stoped to release it's IP address.
Ideally this should be setup using a domain and a DNS A record instead.

Google Cloud - Adding additional Internal IP to VM

I'm trying to build a webserver in Google Cloud Platform that hosts multiple websites (GBP, IE, FR, DK etc.)
Generally, we assign a range of IPs to the server statically, set the bindings in IIS, then loadbalance using a virtual IP.
It seems near enough impossible to assign another internal IP in GCP. Lots of guides about additional external IPs, but we don't want a public facing webserver like this.
Anybody have any idea on how to add additional internal IPs to a VM / Instance?
Also, I have tried changing the internal address I have assigned to the Instance to static in network adapter settings, next thing I know I can't access my VM for love nor money, had to delete and re-create. If I go into advanced settings to add additional static IPs, w'ere set to DHCP apparently, so can't add additional IPs.
Thanks all.
Answer that I recieved from GCE discussion group, in Google Groups:
"You can add additional internal IP addresses to a VM instance. This is possible by enabling IP forwarding for the VM, creating a static network route, adding appropriate firewall rules, and setting additional internal IP addresses to network adapter of Windows. These steps are described in this article for Linux machines (https://cloud.google.com/compute/docs/networking#set_a_static_target_ip_address). The same steps are valid for Windows VMs. You will need to keep the initial internal IP address, subnet mask, gateway address and DNS settings of the adapter and manually enter them in properties of IPv4 of the network adapter. The below is a screenshot of my configuration on a VM instance (Windows 2008 R2) that perfectly works."
Update:
Now, you can create instances with multiple network interfaces On Google Compute Engine and assign IPs. For more information, refer to this public documentation link. However, currently it has following limitations:
Alias IP ranges are not supported on any network interface on a VM
that has multiple network interfaces enabled.
You cannot modify or delete the network interfaces after the VM has
been created.

Google Compute Engine Group Intance keeps changing IP address

I have a google VM Instance Group setup so I can use autoscale (currently turned off until I'm ready to load test) when traffic/requests increase. I'm running a standard LAMP stack to run CraftCMS.
For some reason, the static IP address keeps changing making it unavailable to update via SSH through the console. When the IP changes, my LAMP stack is gone and I have to reinstall everything.
I tried claiming a static ip address and applying it to the VM Instance but that seems to do nothing.
How do I setup a Managed Group instance so this stops happening. If the ip address keeps changing, how can I setup the A Name DNS settings so that when you go to the actual URL it points to the correct server?
It all seems to work fine when I don't setup a Managed Group Instance but a regular VM Instance. But I want autoscaling to be on so I don't have to manually manage it.
Any help with this would make my day...

Can't access site using external IP. Get error "invalid fingerprint"

I'm trying to access my Google Compute Engine VM at 104.197.83.224. I tried to allow HTTP and HTTPS traffic but it errors out both times. It gives the error Invalid Fingerprint.
Could use some help. Thanks!
Also, although I haven't used my VM at all, I've gotten a bunch of requests on it. And its starting to charge me even though I'm not using it. How can I prevent that?
It sounds like you've stored a previous SSH key for that IP address in your ~/.ssh/known_hosts file. Check that file for entries that have the same IP address as your current instance and remove them.
Unfortunately, SSH assumes that IP addresses and SSH keys are assigned fairly statically (rather than using signatures from some central trust authority like SSL), which is a problem when you start to have cloud services which may assign the same IP address to different VMs several times during one day (if the VMs are started and shut down quickly, for example). I think that the gcloud ssh comm

Setting IP address of the Guest operating system while launching qemu

I am launching qemu using qemu-system-x86_64 along with options. What options should I give to assign IP address for guest OS I launched, so that I can ping the guest os from my host machine.
Can anyone help me on this and post if there any other way to assign IP address of Guest OS other than passing it from command line of qemu-system-x86-64?
Thanks.
I haven't found a good solution to do this via command line.
First and foremost, your best bet is probably Cloud-Init. I've had varying success but I also haven't spent a ton of time perfecting it, either.
You could utilize DHCP and get the IP address from the guest agent after the VM boots. If you are placing it in a network that doesn't have DHCP then you could consider using dnsmasq on Proxmox.
If you're using multiple VLANs, you could also consider building the VM in a VLAN with DHCP (either from your router or using the aforementioned Proxmox dnsmasq approach) and then SSH / RDP in and set the static address and move the NIC to the right VLAN.
If you're trying to automate this deployment, I'd recommend using Terraform and Ansible (Terraform to build, Ansible to configure) to accomplish this. I've found the best approach is to configure and trigger the Terraform with Ansible and then save the IPs as facts. You can then use the facts to delegate the Ansible task to the temporary IP and then log in to set the static IP address. If you're changing VLANs then you can either use Terraform or Ansible to adjust the config but I've found Terraform to be best for this task.