Skip to main content
IMHCloud Logo
Back to glossary

Floating IP

A floating IP is a static public IP address that you can assign to and move between instances in a cloud environment, allowing external network access that persists across instance changes.

What is a Floating IP in cloud hosting?

A floating IP is a static public IP address that you can assign to and move between instances (virtual machines) in a cloud environment. It provides a persistent external IP address for accessing your instance from the internet. The term "floating" means the IP address is not permanently tied to a single instance and can be reassigned to different instances as needed.

When you launch an instance in a private network, it typically receives only a private IP address that cannot be reached from outside the cloud network. A floating IP bridges this gap by giving that instance a public IP address that external users and services can connect to.

Why Floating IPs Exist

Without floating IPs, every instance would need either a permanent public IP address from your provider or no external connectivity at all. Permanent public IPs waste addresses when instances are temporary or change frequently. No external connectivity means you cannot reach your instance from outside the cloud network.

Floating IPs solve this by creating a pool of reusable public IP addresses. You assign a floating IP only when external access is needed. When you delete an instance or no longer need external access, you release the floating IP back to the pool for reuse. This conserves IPv4 addresses and gives you control over which instances are publicly accessible.

What Do Floating IPs Actually Do?

  • Provides a static public IP address that external networks can route traffic to
  • Maps the public IP address to an instance's private IP address through network address translation
  • Allows you to reassign the same public IP to a different instance without changing DNS records or client configurations
  • Enables external access to instances that only have private network addresses
  • Persists independently of any specific instance so the IP address remains available even when instances are deleted

When would I use Floating IP?

You would use a floating IP when you need to make an instance accessible from the internet. Common use cases include running a public web server that needs to accept HTTP/HTTPS traffic, providing SSH access to an instance from your local machine, hosting an API endpoint that external applications connect to, or running a mail server that sends and receives email from external domains.

You would also use a floating IP when you need a consistent public IP address that does not change. If clients connect to your instance by IP address instead of a domain name, or if your IP address is whitelisted in firewall rules, a floating IP ensures that address remains stable even if you replace or resize the underlying instance.

When would I NOT use Floating IP?

You would not use a floating IP for instances that should never be directly accessible from the internet. Backend databases, internal application servers, and cache servers typically run in private networks without public IPs. This reduces attack surface and prevents unauthorized external access.

You would also not use a floating IP when a load balancer provides public access instead. Load balancers receive the floating IP and distribute traffic across multiple instances, which means the instances themselves only need private IPs. This is more efficient for multi-instance applications.

Finally, you would not use a floating IP if you are concerned about the cost. Some cloud providers charge for allocated floating IPs, especially if the IP is reserved but not currently attached to an instance. If external access is only needed occasionally, alternatives like VPN connections or bastion hosts may be more cost-effective.

Real-world example

Company A runs a web application on InMotion Cloud with three instances: a web server, an application server, and a database server. The application server and database server run in a private network and communicate using private IP addresses. The web server needs to accept HTTPS requests from customers on the internet.

Company A allocates a floating IP address (203.0.113.45) and assigns it to the web server instance. The router translates incoming traffic on 203.0.113.45 to the web server's private IP (10.0.1.10). Customers can now reach the web application by connecting to 203.0.113.45.

Later, Company A needs to upgrade the web server. They launch a new instance with updated software, reassign the floating IP from the old web server to the new one, and terminate the old instance. Because the floating IP remained the same, customers experienced no disruption and DNS records did not need to change.

Frequently Asked Questions

Do I need more than one Floating IP?

You need one floating IP for each instance that requires direct external access. If you have three web servers behind a load balancer, only the load balancer needs a floating IP. However, if you run separate services like a web server and a mail server on different instances, each instance requires its own floating IP. You can reduce the number of floating IPs by using a load balancer or reverse proxy to route traffic to multiple instances through a single public IP.

Does creating a Floating IP affect existing resources?

Allocating a floating IP from your provider's pool does not affect any existing resources. The IP address exists but is not attached to anything until you explicitly assign it to an instance. Once you attach the floating IP to an instance, that instance becomes reachable from the internet on that IP address. Existing connections to the instance's private IP address continue to work normally.

What happens if I delete a Floating IP?

If you delete a floating IP, the public IP address is returned to your provider's pool and the associated instance loses its external connectivity. Any external services or users trying to connect to that IP address will fail. If the floating IP was attached to an instance, the instance will continue running and remain accessible via its private IP address within the private network, but you will not be able to reach it from the internet. To restore external access, you must allocate and attach a new floating IP, which will have a different IP address.

Can I assign the same Floating IP to multiple instances simultaneously?

No. A floating IP can only be attached to one instance at a time. If you try to attach a floating IP that is already assigned to another instance, you must first detach it from the original instance. This is by design because multiple instances cannot share the same IP address without additional network infrastructure. If you need multiple instances to share a single public IP, use a load balancer that distributes traffic across the instances.

How do I make a Floating IP point to my domain name?

You create a DNS record that maps your domain name to the floating IP address. In your DNS provider's control panel, create an A record (for IPv4) with your domain name and the floating IP address as the value. For example, if your domain is example.com and your floating IP is 203.0.113.45, create an A record: example.com. A 203.0.113.45. DNS propagation typically takes a few minutes to several hours, after which users can access your instance using the domain name instead of the raw IP address.

Summary

  • A floating IP is a static public IP address that you can assign to instances to enable external access from the internet
  • The IP address "floats" because you can reassign it from one instance to another without changing the address itself
  • Floating IPs are necessary when instances run in private networks with only internal IP addresses but need to be reachable from outside the cloud
  • You use floating IPs for public-facing services like web servers, APIs, or any instance that needs to accept connections from the internet
  • You do not use floating IPs for internal-only resources, or when a load balancer provides the public access instead

Related terms

  • Instance (virtual machine): A floating IP attaches to an instance to make it accessible from the internet, such as a web server that needs to receive HTTP requests from external users.
  • Private network: Instances run inside a private network by default with only internal IP addresses, which is why you need a floating IP to enable external access, such as connecting to a database server from your office.
  • Router: A floating IP requires a router to handle the network translation between the public internet and your private network, such as directing incoming traffic on the floating IP to the correct instance's private IP address.