How to Assign Private IPv4 Addresses on Your VPS

When additional IP addresses are required for your VPS, you can increase your IP limit through your my.serveroptima.com panel. This tutorial will guide you through the process of purchasing and assigning IPv4 addresses to your VPS.

 

Step 1: Log in to Your Client Area

- Access the Client Area: Log in to your client area on the my.serveroptima.com portal.

- Navigate to Services: Click on "Services" in the main menu.

- Select Your Server: Locate and click on the server for which you wish to upgrade or assign new IP addresses.

 

Step 2: Click On Network

Now you will see the server details of your chosen server. Click on “more” then select “Upgrade”.

 

Step 3: Select the required IP amount

Use the slider to select the required IP amount and click to the continue button.

 

Step 4: Make the payment

Our system will generate an invoice, make sure you complete the payment. After we have received your payment, the IP addresses will be assigned to your server automatically.

Step 5: Check if the IPs are assigned

Network -> interface -> Assign new IP -> reboot server

Assign IP private

- with private ip you have to add interface

 

 

Next step, we need to configure the network in the VM so that the VM can communicate with the assigned IP. In this case I will configure with IP 192.168.0.101/24 on the newly added interface eth1

Add a new IP to your machine after you have ordered one in ServerOptima.

 

1. Ubuntu, Debian

Login to your VPS and add the following file, you can use the editor you like.

sudo nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

Add the following to this file:

# custom config to disable the networks section of cloud-init
---
network: 
 config: disabled

After you have added this file, we need to add a new file for the new network configuration.

sudo nano /etc/netplan/50-static.yaml

And modify the file as followed, make sure to use the correct IP's that you can find on your network interface of the VPS. You can use whatever DNS services you want. Here is a list of open DNS resolves you can use: List of Public DNS Servers

network:
    version: 2
    ethernets:
        eth0:
            addresses:
            - xx.xx.xxx.xxx/24
            match:
                macaddress: xx:xx:xx:xx:xx:xx
            nameservers:
                addresses:
                - 8.8.8.8
                search:
                - local
            routes:
            -   to: default
                via: xx.xx.xxx.x
            set-name: eth0
        eth1:
            match:
                macaddress: xx:xx:xx:xx:xx:xx
            addresses:
            - "192.168.0.101/24"
            nameservers:
                 addresses:
                 - 8.8.8.8
                 search:
                 - local
            set-name: eth1   

 

2. AlmaLinux, RockyLinux, CentOS

Login to your VPS and add the the following file, you can use the editor that you like.

sudo nano /etc/cloud/cloud.cfg.d/01_network.cfg

Add the following to the file:

# custom config to disable the networks section of cloud-init
---
network: 
 config: disabled

After we have added this file, we need to modify the network part of the VPS.

Open the following file:

vim /etc/sysconfig/network-scripts/ifcfg-eth1

And modify the file as followed, make sure to use the correct IP's that you can find on your network interface of the VPS. You can use whatever DNS services you want. Here is a list of open DNS resolves you can use: List of Public DNS Servers

BOOTPROTO=static
DEVICE=eth0
DHCPV6C=yes
HWADDR={mac_address of the interface}
IPV6INIT=yes
ONBOOT=yes
TYPE=EthernetIPADDR=192.168.0.100
PREFIX=24

To make sure it works, reboot the VM.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 11943