Skip to end of metadata
Go to start of metadata

How to setup dedicated IP on a vps

Why would one want additional dedicated IP address:

♦ To be able to use SSL certificate for the web site
♦ To be able to enhance search engine ranking
♦ To be able to log in to the web site using IP address instead of some URL like http://12.34.56.78/~username

Additional IP addresses can be added via VPS.NET Dashboard and setup on  VPS directly. The way how IP addresses are setup on the server depends on the server type. But let’s start with purchasing of the IP. We can do this by going to “Get additional IP addresses” under “Manage VPSs” section in VPS.NET Dashboard

  Click “Add IP Address

and choose a server (for which additional IP address is required).


As soon as “Confirm” button is pressed, you will be taken to the page with IP address details that will be required while configuring network on the VPS.

 And now how to set up this IP on the VPS.

- WHM/cPanel:

 Go to “Add a New IP Address” in “IP Functions” section in WHM panel.

Enter details of the new IP address as per dashboard:

and press “Submit“. Check if you can ping new IP.

- ISP manager:

Log in to ISPManager as root and go to “Server Settings” and choose “IP-addresses

click “New

 and just enter new dedicated IP, then click “Ok


If you want to assign a few websites on the same IP simply change System Policy.
For changing it go to “Other Settings“, pick “Policy

mark the checkbox “Allow shared IP-addresses” for all users” and press “Ok

- CentOS / CloudLinux without any control panel

Log in to the server and go to /etc/sysconfig/network-scripts/ folder. The directory should contain network configuration files:

drwxr-xr-x 2 root root  4096 Mar 14 08:34 ./
drwxr-xr-x 9 root root  4096 Jun 25 10:21 ../
-rw-r--r-- 1 root root   169 Sep 29  2011 ifcfg-eth0
-rw-r--r-- 1 root root    86 Nov 16  2011 ifcfg-eth1
-rw-r--r-- 1 root root   254 Dec 19  2011 ifcfg-lo
lrwxrwxrwx 1 root root    20 Mar 14 08:34 ifdown -> ../../../sbin/ifdown*
-rwxr-xr-x 1 root root   625 Dec 19  2011 ifdown-bnep*
-rwxr-xr-x 1 root root  5336 Dec 19  2011 ifdown-eth*

In order to configure subinterface – create a new file with the name ifcfg-eth0:1 and write the following:

DEVICE=eth0:1 
BOOTPROTO=static 
IPADDR=NEW_IP 
NETMASK=NETWROK_MASK_FOR_THIS_IP
ONBOOT=yes

It should look like this:

DEVICE=eth0:1 
BOOTPROTO=static 
IPADDR=169.254.25.24 
NETMASK=255.255.255.0 
ONBOOT=yes

Then just save this file and restart network:

# /etc/init.d/network restart

Check if IP is up with

# ifconfig

- Debian/Ubuntu

Log into your server and open /etc/network/interfaces file with any preferred editor, a file with the following content will appear:

# Automatically generated by OnApp 
 
auto lo 
iface lo inet loopback
 
auto eth0 
iface eth0 inet static 
    address XXX.XXX.XXX.XXX 
    netmask XXX.XXX.XXX.XXX 
    broadcast XXX.XXX.XXX.XXX 
    network XXX.XXX.XXX.XXX 
    gateway XXX.XXX.XXX.XXX

Add the new lines at the end of the document:

auto eth0:1 
iface eth0:1 inet static
    address YOUR_NEW_IP   
    netmask NETWORK_MASK_FOR_THIS_IP

As result, the following lines will  show up:

# Automatically generated by OnApp 
 
auto lo 
iface lo inet loopback 
 
auto eth0 
iface eth0 inet static
    address XXX.XXX.XXX.XXX
    netmask XXX.XXX.XXX.XXX
    broadcast XXX.XXX.XXX.XXX
    network XXX.XXX.XXX.XXX
    gateway XXX.XXX.XXX.XXX
 
auto eth0:1 
iface eth0:1 inet static
    address XXX.XXX.XXX.XXX
    netmask XXX.XXX.XXX.XXX

Then just save this file and restart network:

# /etc/init.d/networking restart

Check if IP is up with

# ifconfig

- Windows 2008

Firstly, log in through Dashboard console (go to VPS.NET Dashboard, choose Manage VPSs, then My VPSs,  press on label of your server and click on Console tab)
and go to Main Menu and choose “Control Panel


Network and Internet


Network and Sharing Center


Change adapter settings


click right button on “Local Area Connection” and select “Properties

Internet Protocol Version 4 (TCP/IPv4)” in Properties on “Networking” tab

there will be main IP of this server, so go to “Advanced” in section “IP Addresses

click “Add

Enter new IP details then just click “Add“.

So IP has been configured but network setting has not been saved yet.
We should click “OK” in “Advanced TCP/IP Settings“, click “OK” in “Internet Protocol Version 4 (TCP/IPv4) Properties” and click “OK” in “Local Area Connection Properties“.
Check if you can ping your new IP address.

If you have any issues setting up additional IP on the VPS, do not hesitate to contact our support team. We are here 24/7 to assist you.

Save this article