
Assigning multiple public IP addresses to a Vultr Compute Instance allows you to host multiple services, bind applications to separate IPs, or configure advanced networking setups such as NAT or IP-based virtual hosts. Vultr makes it easy to add and manage additional IP addresses through the Vultr Customer Portal.
This guide explains how to assign and configure multiple public IPv4 addresses on a Vultr Compute Instance. It covers adding IPs from the portal, configuring the operating system, and verifying network connectivity.
Prerequisites
Before you begin, you need to:
- Have access to Vultr Customer Portal.
Follow these steps to assign and configure multiple public IPv4 addresses on your Ubuntu instance.
Log in to the Vultr Customer Portal.
Navigate to Compute under the Products section.
Select your Ubuntu server and click Settings.
Under the IPv4 section, you can see the default IP address assigned to the server.
Click Add Another IPv4 Address, check the box labeled Yes, add and restart this server, and click Add IPv4 Address to assign a new IPv4 address to your server.
After the IP is assigned, you must manually configure it on the server.
Click Network Configuration to generate and copy the custom Netplan template based on your OS.
Below is an example configuration for Ubuntu server using Netplan.
yamlnetwork: version: 2 renderer: networkd ethernets: enp1s0: dhcp4: no addresses: [192.0.0.4/23,192.0.2.5/32] nameservers: addresses: [192.0.0.6] routes: - to: default via: 192.0.0.1 - to: 169.254.0.0/16 via: 192.0.0.1 metric: 100
Replace the following values with those provided in your Vultr Customer Portal:
192.0.2.5: Your newly assigned IPv4 address.192.0.0.6: Your DNS server.192.0.0.1: Your gateway IP.
In the above configuration:
network: The top-level key that begins the Netplan configurationversion: Specifies the Netplan format version. Version 2 is the standard used in most modern Ubuntu systems.renderer: Indicates which backend to use for applying the configuration.ethernets: Defines Ethernet interface configurations. All Ethernet-based interfaces should be declared under this section.enp1s0: The name of the network interface being configured.dhcp4: no: Disables DHCP for IPv4, so the interface uses a static IP configuration.addresses: A list of static IP addresses assigned to the interface.nameservers: Specifies DNS resolver addresses.routes: Adds static routes to control traffic flow.to: default / via: 192.0.0.1: Sets the default gateway to 192.0.0.1, used for routing external traffic.to: 169.254.0.0/16 / via: 192.0.0.1 / metric: 100: Routes link-local addresses via the same gateway with a metric of 100.
After you have copied the configuration, SSH into your Ubuntu server.
Create a new Netplan configuration file using a text editor such as
nano.console$ sudo nano /etc/netplan/10-enp1s0.yaml
Paste the copied configuration into the file, then save and exit.
Set restrictive file permissions to prevent unauthorized changes.
console$ sudo chmod 400 /etc/netplan/10-enp1s0.yaml
Test the configuration before applying it permanently.
console$ sudo netplan try
This command applies the new network configuration temporarily and gives you
120seconds to confirm that everything is working as expected. If the system loses connectivity or something goes wrong, Netplan automatically rolls back to the previous configuration after the timeout, preventing accidental lockouts on remote systems.- Press <kbd class="key">Enter</kbd> to accept and apply the changes permanently.
- Press <kbd class="key">Esc</kbd> or wait for the timer to expire if something breaks.
If everything works as expected, apply the configuration permanently.
console$ sudo netplan apply
Restart the server from the Vultr Customer Portal by clicking the Server Restart icon to make the changes take effect.
Follow these steps to assign and configure multiple public IPv4 addresses on your CentOS instance.
- Log in to the Vultr Customer Portal.
- Navigate to Compute under the Products section.
- Select your CentOS instance from the list.
- Click the Settings tab.
- Under the IPv4 section, you can see the default IP address assigned to the server.
- Click Add Another IPv4 Address.
- Check the box labeled Yes, add and restart this server, then click Add IPv4 Address to assign a new IP.
- After the IP is provisioned, click the Server Restart icon to reboot the instance.
- On boot, cloud-init will automatically configure the newly assigned IP address in the network interface.
Follow these steps to assign and configure multiple public IPv4 addresses on your FreeBSD instance.
Log in to the Vultr Customer Portal.
Navigate to Compute under the Products section.
Select your FreeBSD instance from the list.
Click the Settings tab.
Under the IPv4 section, you can see the default IP address assigned to the server.
Click Add Another IPv4 Address.
Check the box labeled Yes, add and restart this server, then click Add IPv4 Address to assign a new IP.
SSH into the server.
Create a backup of existing
/etc/rc.conf.console$ sudo cp -pvr /etc/rc.conf /etc/rc.conf.backup
Edit the
/etc/rc.conffile and update it with the following configuration.inihostname="FreeBSD" sshd_enable="YES" ntpd_enable="YES" static_routes="linklocal" route_linklocal="-net 169.254.0.0/16 -interface vtnet0" ifconfig_vtnet0="inet 192.0.0.4 netmask 255.255.254.0" defaultrouter="192.0.0.1" ifconfig_vtnet0_alias0="192.0.2.5 netmask 255.255.255.255"
Remove the existing
ifconfig_vtnet0parameter and Replace the following values with those provided in your Vultr Customer Portal:192.0.0.4: Your Main IP address.192.0.2.5: Your newly assigned IPv4 address.192.0.0.6: Your DNS server.192.0.0.1: Your gateway IP.
In the above configuration:
ifconfig_vtnet0: Sets your primary IP.defaultrouter: Defines the system’s default gateway.ifconfig_vtnet0_alias0: Adds an alias for the additional public IP using a/32netmask.
If your system uses a different network interface (such asNotexn0,em0, orre0), replacevtnet0accordingly. Useifconfigto identify your active interface.Reboot the instance from the Vultr Customer Portal to apply the changes.
Follow these steps to assign and configure multiple public IPv4 addresses on your Windows instance.
Configure the Main IP addresses
Open the Windows Control Panel. You can access it from the Start menu.
Click Network and Internet, then click Network and Sharing Center.
Click Change adapter settings.
Right-click the primary Ethernet adapter, then click Properties. The Ethernet Properties window will open.
Select Internet Protocol Version 4 (TCP/IPv4), then click the Properties button. The Internet Protocol Version 4 (TCP/IPv4) Properties window will open.
Check the option Use the following IP address: and populate the fields:
- IP address: 192.0.0.4
- Subnet mask: 255.255.254.0
- Default gateway: 192.0.2.1
Replace the above IP addresses with your Main IP address and correspondence details listed in the Vultr Customer Portal.
Check the option Use the following DNS server addresses: and populate the fields:
- Preferred DNS server: 192.0.0.6
- Alternate DNS server: (leave blank)
Click OK, then click OK again on the Ethernet Properties window. The main IPv4 has now been configured manually.
It's normal for the network connection to temporarily drop after saving the changes.Note
Add Additional IPv4 Addresses
After the primary IPv4 address is manually configured, follow these steps to add more public IP addresses.
Repeat the steps above to open the Internet Protocol Version 4 (TCP/IPv4) Properties window for the same network adapter.
Click the Advanced button.
Under the IP addresses section, click Add to add another IP address.
Enter your additional IP address:
- IP address: 192.0.2.5
- Subnet mask: 255.255.255.255
Click OK on all open windows to apply the changes.
Verify that the new IP address is assigned by running the below command in powershell.
pwsh> ipconfig
Output:
Windows IP Configuration Ethernet adapter Ethernet Instance 0: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::5400:5ff:fe8b:4d04%3 IPv4 Address. . . . . . . . . . . : 192.0.2.5 Subnet Mask . . . . . . . . . . . : 255.255.255.255 IPv4 Address. . . . . . . . . . . : 192.0.0.4 Subnet Mask . . . . . . . . . . . : 255.255.254.0 Default Gateway . . . . . . . . . : 192.0.0.1
Conclusion
In this guide, you learned how to assign and configure multiple public IPv4 addresses to a Vultr Cloud Compute Instance across various operating systems, including Ubuntu, CentOS, FreeBSD, and Windows. You added additional IP addresses through the Vultr Customer Portal and configured each system to recognize the new IPs using platform-specific tools like Netplan, rc.conf, and the Windows Network Settings panel.