This tutorial explains how to setup an additional IPv4 address on your Vultr VPS.
Introduction
A basic network configuration at Vultr consists of a single IPv4 address, configured by DHCP. If you have advanced networking requirements, Vultr supports multiple public IPs and up to five private networks. You need to manually configure these advanced scenarios
Ubuntu 17.10, Ubuntu 18.xx, Ubuntu 19.xx, Ubuntu 20.xx
Add Another IPv4 Address
step 1:Server Information->Setting – >Add Another IPv4 Address
Add IPv4 Address?
IPv4 Address: 1**.1**.1**.1**
Please note: Your server will require a server restart to add the IP address and you will need to manually configure it in your OS.
Additional IPs are billed at $0.003/hour.
Yes, add and restart this server.
Additional IPv4 IP
IPv4 Addresses cost $2/month or $0.003/hour.
You will need to manually configure additional IPs on your VPS.
You are limited to a maximum of 2 additional IPv4 IPs per VPS.
Configure a IPv4 Address at Vultr
step 1:Determine the name of your ethernet device. In this example, we'll use ens3
ip link show
output
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 56:00:09:d8:91:bb brd ff:ff:ff:ff:ff:ff
step 2:Populate the /etc/netplan/10-ens3.yaml file with the following text.
You only really need to change these files if you are trying to enable additional IPs.
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
addresses: [1x5.1xx.1xx.1xx/1xx,1xx.1xx.1x9.xxx1/32]
gateway4: 1xx.1xx.1xx.1
nameservers:
addresses: [1xx.x1.1x.1x0]
routes:
- to: 1xx.2xx.0.0/16
via: 1xx.1xx.1xx.1
metric: 100
step 3:Update networking or reboot.
netplan try
Restart your server
step 4:restart your server
You must restart your server via the control panel after adding extra IPs.
View IpAddress
# ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 1xx.1xx.1xx.1xx netmask 255.255.254.0 broadcast 155.138.159.255
inet6 fxx::5xx:xx:fxx:4xx prefixlen 64 scopeid 0x20<link>
ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 960520 bytes 246784205 (246.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1063715 bytes 248721785 (248.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 12181 bytes 20018460 (20.0 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12181 bytes 20018460 (20.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0