Floating IP Addresses
Floating IP addresses are external IP addresses that can be attached and detached to virtual machines on the fly. On our cloud platform, all external IPs are floating IPs.
You can manage the internal IPs and floating IPs on a VM by selecting the VM, and opening the IP tab.
After creating a VM, the system automatically sets up one internal IP and one floating IP on the VM. You'll see these from the IP tab of a new VM.
To transfer a floating IP from one VM to another:
- Select the source VM, open the IP tab, and press De-Associate Floating IP.
- This floating IP will now be unattached, but reserved on your account.
- Select the destination VM, open the IP tab, de-associate any existing floating IP, and then press Associate Floating IP.
You can update the rDNS (PTR) records of a floating IP from either the IP tab, or from Floating IPs.
The first IP attached to each non-shelved VM is free. Unattached floating IPs and additional attached floating IPs are billed at $1/mo each. For example, if you have a VM with two floating IPs active for half a month, you'll be charged $0.50.
After adding a second IP to your VM, you will need to update your network configuration for both IPs to be usable. For an example configuration file, select the VM, go to the IP tab, and press Network Configuration Details.
You can attach up to three additional floating IPs (four total) to each VM.
Configuring Software for Floating IPs
If you have one IP address assigned to your VM, typically special configuration is not needed. The configuration below is generally intended to manage multiple IP addresses assigned to one container.
cPanel provides 1:1 NAT support to make it easy to use the panel on cloud platforms like LunaNode. Check here for details on how to add the IP addresses to cPanel. In cPanel, "public IP address" refers to the floating IP address, while "private IP address" refers to the internal IP configured on the network interface on your VM.
Apache, nginx, etc.
Suppose that you assign two floating IP addresses for two internal IPs on one network interface:
- 188.8.131.52 for 172.20.0.2
- 184.108.40.206 for 172.20.0.3
If you want to run a website on 220.127.116.11, use 172.20.0.2 in the webserver configuration. If you want to run a website on 18.104.22.168, then use 172.20.0.3.