Unmetered Dedicated ServerDedicated Server SupportDedicated Server Live Help

How to add an additional IP to Ubuntu Server

 

1.) Open the Network Interface with your favorite text editor

nano /etc/network/interfaces

Here is an example of what it will look like:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 108.210.118.56
        netmask 255.255.255.224
        broadcast 108.210.118.63
        network 108.210.118.32
        gateway 108.210.118.33



 

 

2.) Add a new line below auto eth0 with your IP, Netmask and gateway. For example,

It should look like this:

auto lo
iface lo inet loopback

auto eth0
auto eth0:1
iface eth0 inet static
        address 108.210.118.56
        netmask 255.255.255.224
        broadcast 108.210.118.63
        network 108.210.118.32
        gateway 108.210.118.33
iface eth0:1 inet static
        address 108.210.118.58
        netmask 255.255.255.224
        broadcast 108.210.118.63
        network 108.210.118.32
        gateway 108.210.118.33

 

 

 

3.) Save the file and exit the text editor. Then restart the network by running the following command:

/etc/init.d/networking restart