HowTo: Add a secondary IP to your VPS.

In this guide we will explain on how to add a new IP to your machine after you have ordered one in MyTilaa.

AlmaLinux, RockyLinux, CentOS

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

vim /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-eth0

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=Ethernet
IPADDR=192.168.0.152
GATEWAY=192.168.0.1
PREFIX=24
IPADDR2=192.168.100.123
GATEWAY2=192.168.100.1
PREFIX=24
DNS1=1.1.1.1
DNS2=1.0.0.1

To make sure it works, reboot the machine from within MyTilaa.

 

Ubuntu, Debian

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

vim /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.

vim /etc/netplan/60-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:
ens3:
dhcp4: no
addresses:
- 192.168.0.152/24 # IP address for ens3
gateway4: 192.168.0.1
routes:
- to: default
via: 192.168.0.1
table: 1
nameservers:
addresses: [1.1.1.1,1.0.0.1]

ens4:
dhcp4: no
addresses:
- 192.168.100.123/24 # IP address for ens4
gateway4: 192.168.100.1
routes:
- to: default
via: 192.168.0.1
table: 2
nameservers:
addresses: [1.1.1.1,1.0.0.1]

 


DirectAdmin, cPanel

For some applications, like running DNS on a single server, a second IP address is needed. To enable this on your VPS, some configuration adjustments have to be done. 

Directadmin: Admin Tools --> IP Management --> Add IP
cPanelHome --> IP Functions --> Add a New IP Address

 

Windows Server

Please make sure that you’ve your primary IP address manually configured via the video display option from your Tilaa dashboard otherwise you can’t configure your additional IP address. All related network information can be found on your Tilaa dashboard -> server overview -> network tab.

Navigate to:
start -> control panel -> network and internet -> view network status and tasks ->  "ethernet" or "Local Area Connection" -> properties and open the properties of “internet Protocol Version 4 (TCP/IPv4)” and manually configure your primary IP address. 

When you have your primary IP manually configured return back to the properties of “internet Protocol Version 4 (TCP/IPv4)” and click the advanced button and click the add button to add an additional IP.


Screen_Shot_2016-04-25_at_21.13.32.png

Was this article helpful?
4 out of 6 found this helpful

Comments

0 comments

Article is closed for comments.

Articles in this section

See more