How to add IPs to your VPS server

On bash, go to /etc/sysconfig/network-scripts and you will see a list of interfaces

[root@server /etc/sysconfig/network-scripts]# ls *
ifcfg-lo        
ifcfg-venet0    
ifcfg-venet0:0

Add a new file after the last one, in the example the new file will be ifcfg-venet0:2

[root@server /etc/sysconfig/network-scripts]# nano ifcfg-venet0:2

and inside paste the details for the IP ranges. Let's say that you have been assigned the range 67.17.18.224/29 (8 in total, 5 usable IPs)

DEVICE=venet0:2
ONBOOT=yes
IPADDR=67.17.18.226             #<--Here the IP address
BROADCAST=67.17.18.231    #<--Here the last one for the range
NETWORK=67.17.18.224         #<--Here the first one for the range

Save the file and do the same for every other ip

[root@server /etc/sysconfig/network-scripts]# nano ifcfg-venet0:3

DEVICE=venet0:3
ONBOOT=yes
IPADDR=67.17.18.227             #<--Here the IP address
BROADCAST=67.17.18.231    #<--Here the last one for the range
NETWORK=67.17.18.224         #<--Here the first one for the range

 

and so on

 

At the end don't forget to do

service network restart

so that the new settings are loaded

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Install NAT and openvpn in a openvz node, with NAT enabled.

#This instructions are ready for you to copy and paste in putty bash command line. The commands...

Deprecated functions php 5.3 (eregi, ereg, spliti, split . ..). How to make your code work again.

You had a website and all of the sudden it stopped working? Got the error Deprecated: Function...

optimize your site for speed. mod_deflate

Enable GZIP Compression on Per Account Basis Login to cPanel account for the user account which...