How To Configure Additional IP Addresses On A Linux VPS Print

  • 1

When you purchase a Linux VPS, you are given one primary IP address and are able to purchase more IP addresses. You must configure the Linux VPS to accept and use the new addresses in order to use them.

 

To configure IP addresses for the different types of Linux operating systems installed on your Linux VPS, follow the procedures below.

 

For Centos and Fedora:

 

Step 1

 

Log in to the Linux VPS using SSH

 

Step 2

 

Type the following command:


cd /etc/sysconfig/network-scripts

 

Step 3

 

In the text editor of your choice, create a new file named ifcfg-eth0:0

 

Step 4

 

Insert the following text into the file:


DEVICE=eth0:0

BOOTPROTO=none

ONPARENT=yes

IPADDR=xxx.xxx.xxx.xxx

NETMASK=255.255.255.0

 

Step 5

Replace xxx.xxx.xxx.xxx with the IP address you want to add. After it is done, save the file (ifcfg-eth0:0) and exit.

 

Step 6

Restart the network interfaces by typing in the following commands:

service network restart

 

Step 7

To check for the newly added IP address, type the following command:

ifconfig

 

For Debian and Ubuntu:

 

Step 1

Log in to the Linux VPS using SSH

 

Step 2

In the text editor of your choice, open the file cd /etc/network/interfaces

 

Step 3

Insert the following text into the file:

 

# The primary network interface
auto eth0:0

iface eth0:0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.255.0

 

Step 4

 

Replace xxx.xxx.xxx.xxx with the IP address you want to add. After it is done, save the changes to the/etc/network/interfaces and exit.

 

Step 5

 

Restart the network interfaces by typing in the following commands:

 

/etc/init.d/networking restart - Debian

ifdown -a --exclude=lo; ifup -a --exclude=lo - Ubuntu

 

Step 6

6. To check for the newly added IP address, type the following command:

ifconfig

 


Was this answer helpful?

« Back

Powered by WHMCompleteSolution